[0] ThrowableError in Loupan.php line 449

致命错误: Call to a member function toArray() on null

  1. }
  2. //楼盘详细
  3. private function getHouseInfo($id)
  4. {
  5. $info = model('house')->where(['id' => $id, 'status' => 1])->find();
  6. if (!empty($info)) {
  7. $info = $info->toArray();
  8. }
  9. $info_data = model('house_data')->where(['id' => $id])->find()->toArray();
  10. return array_merge($info, $info_data);
  11. }
  12. //楼盘相册 切换图
  13. private function getHousePic($id)
  14. {
  15. $lists = model('house_pic')->where(['house_id' => $id, 'status' => 1])->field('img,cate_name')->order('ordid desc')->select();
  16. $this->assign('slidePic', $lists);
  17. }

Call Stack

  1. in Loupan.php line 449
  2. at Loupan->getHouseInfo(39) in Loupan.php line 173
  3. at Loupan->detail()
  4. at ReflectionMethod->invokeArgs(object(Loupan), []) in App.php line 343
  5. at App::invokeMethod([object(Loupan), 'detail'], []) in App.php line 612
  6. at App::module([null, 'Loupan', 'detail'], ['app_debug' => true, 'app_trace' => false, 'app_status' => '', ...], false) in App.php line 456
  7. at App::exec(['type' => 'module', 'module' => [null, 'Loupan', 'detail'], 'convert' => false], ['app_debug' => true, 'app_trace' => false, 'app_status' => '', ...]) in App.php line 139
  8. at App::run() in start.php line 18
  9. at require('/home/php/landzg_web...') in index.php line 17

Environment Variables

GET Data
empty
POST Data
empty
Files
empty

Cookies

cityInfo
think:{"id":"1","name":"%E5%8D%97%E5%AE%81","initials":"N","alias":"nn","pid":0,"spid":"0","ordid":"255","status":"1","seo_title":"","seo_keys":"","seo_desc":"","domain":"nn","is_hot":"1","default":"1","zuobiao":"108.328589%2C22.8189"}
Session
empty

Server/Request Data

USER
apache
HOME
/usr/share/httpd
HTTP_HOST
nn.landzg.com
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
REDIRECT_STATUS
200
SERVER_NAME
landzg.com
SERVER_PORT
80
SERVER_ADDR
10.1.1.83
REMOTE_PORT
39432
REMOTE_ADDR
44.220.41.140
SERVER_SOFTWARE
nginx/1.20.1
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/home/php/landzg_web/public
DOCUMENT_URI
/index.php/loupan/39.html
REQUEST_URI
/loupan/39.html
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
PATH_TRANSLATED
/home/php/landzg_web/public/loupan/39.html
PATH_INFO
/loupan/39.html
SCRIPT_FILENAME
/home/php/landzg_web/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php/loupan/39.html
REQUEST_TIME_FLOAT
1711653227.5822
REQUEST_TIME
1711653227
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/home/php/landzg_web/public/../application/
HX_PATH
/home/php/landzg_web/public/../extend/
THINK_VERSION
5.0.9
THINK_START_TIME
1711653227.5824
THINK_START_MEM
392664
EXT
.php
DS
/
THINK_PATH
/home/php/landzg_web/thinkphp/
LIB_PATH
/home/php/landzg_web/thinkphp/library/
CORE_PATH
/home/php/landzg_web/thinkphp/library/think/
TRAIT_PATH
/home/php/landzg_web/thinkphp/library/traits/
ROOT_PATH
/home/php/landzg_web/
EXTEND_PATH
/home/php/landzg_web/extend/
VENDOR_PATH
/home/php/landzg_web/vendor/
RUNTIME_PATH
/home/php/landzg_web/runtime/
LOG_PATH
/home/php/landzg_web/runtime/log/
CACHE_PATH
/home/php/landzg_web/runtime/cache/
TEMP_PATH
/home/php/landzg_web/runtime/temp/
CONF_PATH
/home/php/landzg_web/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false