[0] ThrowableError in Index.php line 682

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

  1. $this->assign('postbar',$postbar);
  2. $this->assign('inter',$inter);
  3. $this->assign('comment',$comment);
  4. $datainfo = YhData::with(['getCat','getZone','getTag','getCity','getSecondCity'])->where('ischeck',1)->find($data_id);
  5. $this->assign('datainfo',$datainfo);
  6. $this->assign('data_id',$data_id);
  7. $this->assign('tag_id',$tag_id);
  8. // 达人管理数据仓库所属数据页
  9. $pagemem = YhPage::field('yh_page_memid')->where('yh_page_dataid',$data_id)->group('yh_page_memid')->select()->toArray();
  10. $datamem = YhData::field('yh_data_mem_id')->where('yh_data_id',$data_id)->find()->toArray();
  11. $recommendmem = Yh598Recommend::field('yh598_recommend_memid')->where('yh598_recommend_dataid',$data_id)->select()->toArray();
  12. $pagememid = array();
  13. foreach ($pagemem as $value) {
  14. $pagememid[] = $value['yh_page_memid'];
  15. }
  16. $recommendid = array();
  17. foreach ($recommendmem as $value) {
  18. $recommendid[] = $value['yh598_recommend_memid'];
  19. }

Call Stack

  1. in Index.php line 682
  2. at Index->forums(object(Request))
  3. at ReflectionMethod->invokeArgs(object(Index), [object(Request)]) in Container.php line 395
  4. at Container->invokeReflectMethod(object(Index), object(ReflectionMethod), ['data' => '1021', 'tag' => '0', 'convert' => false]) in Module.php line 132
  5. at Module->think\route\dispatch\{closure}(object(Request), object(Closure), null)
  6. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  7. at Middleware->think\{closure}(object(Request))
  8. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  9. at Middleware->dispatch(object(Request), 'controller') in Module.php line 137
  10. at Module->exec() in Dispatch.php line 168
  11. at Dispatch->run() in App.php line 432
  12. at App->think\{closure}(object(Request), object(Closure), null)
  13. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  14. at Middleware->think\{closure}(object(Request))
  15. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  16. at Middleware->dispatch(object(Request)) in App.php line 435
  17. at App->run() in index.php line 21

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
HTTP_HOST www.yh596.com
HTTP_REFERER http://www.yh596.com/bbs-1021.html
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME www.yh596.com
SERVER_PORT 80
SERVER_ADDR 172.26.193.191
REMOTE_PORT 60590
REMOTE_ADDR 18.208.172.3
SERVER_SOFTWARE nginx/1.19.0
GATEWAY_INTERFACE CGI/1.1
REQUEST_SCHEME http
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /www/wwwroot/www.yh596.com/public
DOCUMENT_URI /index.php
REQUEST_URI /index/forums/data/1021/tag/0
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/index/forums/data/1021/tag/0
SCRIPT_FILENAME /www/wwwroot/www.yh596.com/public/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711648497.7422
REQUEST_TIME 1711648497
Environment Variablesempty
ThinkPHP Constantsempty