[0] ThrowableError in Index.php line 1491

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

  1. $interid = $request->param('interid'); //具体问题的id
  2. cache::remember('get_interinfo_by_'.$interid,function()use($interid){
  3. return $info = YhInterlocution::with(['getAnswer'=>function($query){
  4. $query->where('yh_anwser_type',22)->order('yh_anwser_created_at','desc');
  5. },'getTag'=>function($query){
  6. $query->field('yh_tag_id,yh_tag_name');
  7. },'getLogo'=>function($query){
  8. $query->field('yh_data_id,yh_data_short,yh_data_logo,yh_data_title');
  9. },'getImg'])->where('yh_interlocution_id',$interid)->where('yh_interlocution_ischeck',1)->find()->toArray();
  10. });
  11. $info = cache::get('get_interinfo_by_'.$interid);
  12. // 计数统计
  13. $total = new Total;
  14. $total->getEveryPageTotal('inter',$interid,$info['yh_interlocution_tagid'],$info['yh_interlocution_memid']);
  15. $intermemid = $info['yh_interlocution_memid'];

Call Stack

  1. in Index.php line 1491
  2. at Index->app\index\controller\{closure}()
  3. at call_user_func_array(object(Closure), []) in Container.php line 347
  4. at Container->invokeFunction(object(Closure)) in Driver.php line 185
  5. at Driver->remember('get_interinfo_by_243...', object(Closure))
  6. at call_user_func_array([object(Redis), 'remember'], ['get_interinfo_by_243...', object(Closure)]) in Cache.php line 130
  7. at Cache->__call('remember', ['get_interinfo_by_243...', object(Closure)])
  8. at call_user_func_array([object(Cache), 'remember'], ['get_interinfo_by_243...', object(Closure)]) in Facade.php line 123
  9. at Facade::__callStatic('remember', ['get_interinfo_by_243...', object(Closure)]) in Index.php line 1493
  10. at Index->queDetails(object(Request))
  11. at ReflectionMethod->invokeArgs(object(Index), [object(Request)]) in Container.php line 395
  12. at Container->invokeReflectMethod(object(Index), object(ReflectionMethod), ['interid' => '2437775', 'convert' => false]) in Module.php line 132
  13. at Module->think\route\dispatch\{closure}(object(Request), object(Closure), null)
  14. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  15. at Middleware->think\{closure}(object(Request))
  16. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  17. at Middleware->dispatch(object(Request), 'controller') in Module.php line 137
  18. at Module->exec() in Dispatch.php line 168
  19. at Dispatch->run() in App.php line 432
  20. at App->think\{closure}(object(Request), object(Closure), null)
  21. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  22. at Middleware->think\{closure}(object(Request))
  23. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  24. at Middleware->dispatch(object(Request)) in App.php line 435
  25. 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_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 44408
REMOTE_ADDR 3.238.57.9
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/quedt/2437775
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/index/quedt/2437775
SCRIPT_FILENAME /www/wwwroot/www.yh596.com/public/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711646467.5301
REQUEST_TIME 1711646467
Environment Variablesempty
ThinkPHP Constantsempty