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

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\common\model\\' . $modelName;
  10. $info = $model::edit($id)->toArray();
  11. // 获取字段信息
  12. $info = $this->changeInfo($tableName, $info);
  13. return $info;
  14. }
  15. /**
  16. * 获取内容页面TDK
  17. * @param $info 内容
  18. * @param $cate 栏目

Call Stack

  1. in Cms.php line 82
  2. at Cms->getInfo('index', 'product')
  3. at call_user_func_array([object(Cms), 'getInfo'], ['index', 'product']) in Facade.php line 96
  4. at Facade::__callStatic('getInfo', ['index', 'product']) in Error.php line 106
  5. at Error->info('index')
  6. at ReflectionMethod->invokeArgs(object(Error), ['index']) in Container.php line 342
  7. at Container->invokeReflectMethod(object(Error), object(ReflectionMethod), ['id' => 'index']) in Controller.php line 110
  8. at Controller->think\route\dispatch\{closure}(object(Request)) in Pipeline.php line 59
  9. at Pipeline->think\{closure}(object(Request)) in Pipeline.php line 65
  10. at Pipeline->then(object(Closure)) in Controller.php line 113
  11. at Controller->exec() in Dispatch.php line 89
  12. at Dispatch->run() in Route.php line 760
  13. at Route->think\{closure}(object(Request)) in Pipeline.php line 59
  14. at Pipeline->think\{closure}(object(Request)) in Pipeline.php line 65
  15. at Pipeline->then(object(Closure)) in Route.php line 761
  16. at Route->dispatch(object(Request), object(Closure)) in Http.php line 210
  17. at Http->dispatchToRoute(object(Request)) in Http.php line 200
  18. at Http->think\{closure}(object(Request)) in Pipeline.php line 59
  19. at Pipeline->think\{closure}(object(Request)) in MultiApp.php line 71
  20. at MultiApp->think\app\{closure}(object(Request)) in Pipeline.php line 59
  21. at Pipeline->think\{closure}(object(Request)) in Pipeline.php line 65
  22. at Pipeline->then(object(Closure)) in MultiApp.php line 72
  23. at MultiApp->handle(object(Request), object(Closure))
  24. at call_user_func([object(MultiApp), 'handle'], object(Request), object(Closure)) in Middleware.php line 142
  25. at Middleware->think\{closure}(object(Request), object(Closure)) in Pipeline.php line 84
  26. at Pipeline->think\{closure}(object(Request)) in SessionInit.php line 67
  27. at SessionInit->handle(object(Request), object(Closure))
  28. at call_user_func([object(SessionInit), 'handle'], object(Request), object(Closure)) in Middleware.php line 142
  29. at Middleware->think\{closure}(object(Request), object(Closure)) in Pipeline.php line 84
  30. at Pipeline->think\{closure}(object(Request)) in TraceDebug.php line 71
  31. at TraceDebug->handle(object(Request), object(Closure))
  32. at call_user_func([object(TraceDebug), 'handle'], object(Request), object(Closure)) in Middleware.php line 142
  33. at Middleware->think\{closure}(object(Request), object(Closure)) in Pipeline.php line 84
  34. at Pipeline->think\{closure}(object(Request)) in Pipeline.php line 65
  35. at Pipeline->then(object(Closure)) in Http.php line 201
  36. at Http->runWithRequest(object(Request)) in Http.php line 162
  37. at Http->run() in index.php line 25

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
REDIRECT_REDIRECT_UNIQUE_ID ZgWSHyM@eBuPLKPqNwGl9AAAABM
REDIRECT_REDIRECT_PATH_INFO index/product/index.html
REDIRECT_REDIRECT_PHPRC /home/jiuyeqingrj2iqu9yue2q7i3nsg/others
REDIRECT_REDIRECT_STATUS 200
REDIRECT_UNIQUE_ID ZgWSHyM@eBuPLKPqNwGl9AAAABM
REDIRECT_PHPRC /home/jiuyeqingrj2iqu9yue2q7i3nsg/others
REDIRECT_HANDLER php-cgi
REDIRECT_STATUS 200
UNIQUE_ID ZgWSHyM@eBuPLKPqNwGl9AAAABM
PHPRC /home/jiuyeqingrj2iqu9yue2q7i3nsg/others
HTTP_X_FORWARDED_FOR 3.88.60.5
HTTP_X_REAL_IP 3.88.60.5
HTTP_HOST www.jiuyeqing.cn
HTTP_CONNECTION close
HTTP_ACCEPT */*
HTTP_USER_AGENT claudebot
PATH /sbin:/usr/sbin:/bin:/usr/bin
SERVER_SIGNATURE <address>Apache Server at www.jiuyeqing.cn Port 80</address>
SERVER_SOFTWARE Apache
SERVER_NAME www.jiuyeqing.cn
SERVER_ADDR 127.0.0.1
SERVER_PORT 80
REMOTE_ADDR 3.88.60.5
DOCUMENT_ROOT /home/jiuyeqingrj2iqu9yue2q7i3nsg/wwwroot
REQUEST_SCHEME http
CONTEXT_PREFIX /php-run-as-cgi
CONTEXT_DOCUMENT_ROOT /usr/php7.1/bin
SERVER_ADMIN webmaster@jiuyeqing
SCRIPT_FILENAME /home/jiuyeqingrj2iqu9yue2q7i3nsg/wwwroot/public/index.php
REMOTE_PORT 51370
REDIRECT_URL /public/index.php/index/product/index.html
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.0
REQUEST_METHOD GET
QUERY_STRING
REQUEST_URI /public/index/product/index.html
SCRIPT_NAME /public/index.php
PATH_INFO /index/product/index.html
PATH_TRANSLATED /home/jiuyeqingrj2iqu9yue2q7i3nsg/wwwroot/index/product/index.html
ORIG_PATH_INFO /public/index.php/index/product/index.html
ORIG_SCRIPT_NAME /php-run-as-cgi/php-cgi
ORIG_SCRIPT_FILENAME /usr/php7.1/bin/php-cgi
ORIG_PATH_TRANSLATED /home/jiuyeqingrj2iqu9yue2q7i3nsg/wwwroot/public/index.php/index/product/index.html
PHP_SELF /public/index.php/index/product/index.html
REQUEST_TIME_FLOAT 1711641120.0608
REQUEST_TIME 1711641120
0.141945s