#0 [0]Error in Cms.php line 59

Call to a member function toArray() on null

                        
  1. * @param string $tableName
  2. */
  3. public function getInfo(string $id, string $tableName)
  4. {
  5. $modelName = $this->getModelName($tableName);
  6. if (empty($modelName)) {
  7. return false;
  8. }
  9. $model = '\app\cms\model\\' . $modelName;
  10. $info = $model::find($id)->toArray();
  11. return $info;
  12. }
  13. /**
  14. * 获取内容页面TDK
  15. * @param $info 内容
  16. * @param $cate 栏目
  17. * @param $config 系统
  18. * @return array

Call Stack

  1. in Cms.php line 59
  2. at Cms->getInfo()
  3. at call_user_func_array() in Facade.php line 96
  4. at Facade::__callStatic() in Error.php line 78
  5. at Error->info()
  6. at ReflectionMethod->invokeArgs() in Container.php line 343
  7. at Container->invokeReflectMethod() in Controller.php line 110
  8. at Controller->think\route\dispatch\{closure}() in Pipeline.php line 59
  9. at Pipeline->think\{closure}() in Pipeline.php line 66
  10. at Pipeline->then() in Controller.php line 113
  11. at Controller->exec() in Dispatch.php line 89
  12. at Dispatch->run() in Route.php line 772
  13. at Route->think\{closure}() in Pipeline.php line 59
  14. at Pipeline->think\{closure}() in Library.php line 111
  15. at Library->think\admin\{closure}()
  16. at call_user_func() in Middleware.php line 142
  17. at Middleware->think\{closure}() in Pipeline.php line 85
  18. at Pipeline->think\{closure}() in Pipeline.php line 66
  19. at Pipeline->then() in Route.php line 773
  20. at Route->dispatch() in Http.php line 216
  21. at Http->dispatchToRoute() in Http.php line 206
  22. at Http->think\{closure}() in Pipeline.php line 59
  23. at Pipeline->think\{closure}() in Multiple.php line 71
  24. at Multiple->think\admin\multiple\{closure}() in Pipeline.php line 59
  25. at Pipeline->think\{closure}() in Pipeline.php line 66
  26. at Pipeline->then() in Multiple.php line 72
  27. at Multiple->handle()
  28. at call_user_func() in Middleware.php line 142
  29. at Middleware->think\{closure}() in Pipeline.php line 85
  30. at Pipeline->think\{closure}() in LoadLangPack.php line 59
  31. at LoadLangPack->handle()
  32. at call_user_func() in Middleware.php line 142
  33. at Middleware->think\{closure}() in Pipeline.php line 85
  34. at Pipeline->think\{closure}() in SessionInit.php line 67
  35. at SessionInit->handle()
  36. at call_user_func() in Middleware.php line 142
  37. at Middleware->think\{closure}() in Pipeline.php line 85
  38. at Pipeline->think\{closure}() in Pipeline.php line 66
  39. at Pipeline->then() in Http.php line 207
  40. at Http->runWithRequest() in Http.php line 170
  41. at Http->run() in SystemService.php line 349
  42. at SystemService->doInit() in index.php line 21

Environment Variables

GET Data
lang en
class1 115
class2 116
page 5
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
HTTP_REFERER http://www.chinajindn.com/news/news.php?lang=en&class1=115&class2=116&page=5
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
HTTP_HOST www.chinajindn.com
PATH_INFO /news/news.php
REDIRECT_STATUS 200
SERVER_NAME www.chinajindn.com
SERVER_PORT 443
SERVER_ADDR 172.25.55.67
REMOTE_PORT 36116
REMOTE_ADDR 44.210.107.64
SERVER_SOFTWARE nginx/1.20.1
GATEWAY_INTERFACE CGI/1.1
HTTPS on
REQUEST_SCHEME https
SERVER_PROTOCOL HTTP/2.0
DOCUMENT_ROOT /www/wwwroot/www.chinajindn.com/public
DOCUMENT_URI /index.php/news/news.php
REQUEST_URI /news/news.php?lang=en&class1=115&class2=116&page=5
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING lang=en&class1=115&class2=116&page=5
SCRIPT_FILENAME /www/wwwroot/www.chinajindn.com/public/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php/news/news.php
REQUEST_TIME_FLOAT 1711626058.531
REQUEST_TIME 1711626058