#0 [0]Error in News.php line 26

Call to a member function toArray() on null

  1. $this->assign('info',$info);
  2. $TPl = !self::isMobile() ? "/pc/news_index" : "/wap/news_index";
  3. $this->fetch($TPl);
  4. }
  5. public function show()
  6. {
  7. $id = input('id/d');
  8. $info = DmArticle::mk()->find($id)->toArray();
  9. $this->assign('title',"新闻咨询");
  10. $this->assign('info',$info);
  11. $this->assign("pageid","5"); //不显示
  12. $TPl = !self::isMobile() ? "/pc/news_show" : "/wap/news_show";
  13. $this->fetch($TPl);
  14. }
  15. }

Call Stack

  1. in News.php line 26
  2. at News->show()
  3. at ReflectionMethod->invokeArgs() in Container.php line 344
  4. at Container->invokeReflectMethod() in Controller.php line 110
  5. at Controller->think\route\dispatch\{closure}() in Pipeline.php line 59
  6. at Pipeline->think\{closure}() in Pipeline.php line 66
  7. at Pipeline->then() in Controller.php line 113
  8. at Controller->exec() in Dispatch.php line 80
  9. at Dispatch->run() in Route.php line 793
  10. at Route->think\{closure}() in Pipeline.php line 59
  11. at Pipeline->think\{closure}() in RbacAccess.php line 90
  12. at RbacAccess->handle()
  13. at call_user_func() in Middleware.php line 142
  14. at Middleware->think\{closure}() in Pipeline.php line 85
  15. at Pipeline->think\{closure}() in Pipeline.php line 66
  16. at Pipeline->then() in Route.php line 794
  17. at Route->dispatch() in Http.php line 216
  18. at Http->dispatchToRoute() in Http.php line 206
  19. at Http->think\{closure}() in Pipeline.php line 59
  20. at Pipeline->think\{closure}() in MultAccess.php line 75
  21. at MultAccess->think\admin\support\middleware\{closure}() in Pipeline.php line 59
  22. at Pipeline->think\{closure}() in Pipeline.php line 66
  23. at Pipeline->then() in MultAccess.php line 76
  24. at MultAccess->handle()
  25. at call_user_func() in Middleware.php line 142
  26. at Middleware->think\{closure}() in Pipeline.php line 85
  27. at Pipeline->think\{closure}() in LoadLangPack.php line 57
  28. at LoadLangPack->handle()
  29. at call_user_func() in Middleware.php line 142
  30. at Middleware->think\{closure}() in Pipeline.php line 85
  31. at Pipeline->think\{closure}() in JwtSession.php line 117
  32. at JwtSession->handle()
  33. at call_user_func() in Middleware.php line 142
  34. at Middleware->think\{closure}() in Pipeline.php line 85
  35. at Pipeline->think\{closure}() in Pipeline.php line 66
  36. at Pipeline->then() in Http.php line 207
  37. at Http->runWithRequest() in Http.php line 170
  38. at Http->run() in RuntimeService.php line 209
  39. at RuntimeService::doWebsiteInit() in index.php line 23

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
HTTP_ALI_CDN_REAL_IP 107.21.176.63
HTTP_X_CLIENT_SCHEME http
HTTP_X_FORWARDED_FOR 107.21.176.63
HTTP_ALI_SWIFT_STAT_HOST level2.dmsx.com.cn
HTTP_ALI_SWIFT_LOG_HOST dmsx.com.cn
HTTP_EAGLEEYE_TRACEID 3adad01917116491128998239e
HTTP_VIA cn192.l1, kunlun5.cn192, l2cn2647.l2, cache70.l2cn2647
HTTP_HOST dmsx.com.cn
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME dmsx.com.cn
SERVER_PORT 80
SERVER_ADDR 172.26.63.94
REMOTE_PORT 60060
REMOTE_ADDR 153.35.52.218
SERVER_SOFTWARE nginx/1.20.2
GATEWAY_INTERFACE CGI/1.1
REQUEST_SCHEME http
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /www/wwwroot/dmsx.com.cn/public
DOCUMENT_URI /index.php
REQUEST_URI /news/index_4.jsp
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/news/index_4.jsp
SCRIPT_FILENAME /www/wwwroot/dmsx.com.cn/public/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711649113.1399
REQUEST_TIME 1711649113