#0 [0]Error in BocProduct.php line 18

Call to a member function toArray() on null

  1. class BocProduct extends Model
  2. {
  3. protected $cate_type = 'product-product-list';
  4. //获取内容
  5. public function get_info($cate_type,$cache_tag,$id){
  6. $info = Cache::get($cate_type.'-'.$id);
  7. if(empty($info)){
  8. //更新浏览量
  9. $info = self::field('*')->where('id', $id)->find()->toArray();
  10. Cache::tag($cache_tag)->set($cate_type.'-'.$id,$info);
  11. }
  12. return $info;
  13. }
  14. //获取其它类型数据
  15. public function get_list($cate_type,$cache_tag,$type = 'TENTIMES_LAND'){
  16. //获取缓存
  17. $list = Cache::get($cate_type.'-'.$type);

Call Stack

  1. in BocProduct.php line 18
  2. at BocProduct->get_info() in Product.php line 44
  3. at Product->info()
  4. at ReflectionMethod->invokeArgs() in Container.php line 344
  5. at Container->invokeReflectMethod() in Controller.php line 110
  6. at Controller->think\route\dispatch\{closure}() in Pipeline.php line 59
  7. at Pipeline->think\{closure}() in Pipeline.php line 66
  8. at Pipeline->then() in Controller.php line 113
  9. at Controller->exec() in Dispatch.php line 80
  10. at Dispatch->run() in Route.php line 793
  11. at Route->think\{closure}() in Pipeline.php line 59
  12. at Pipeline->think\{closure}() in RbacAccess.php line 87
  13. at RbacAccess->handle()
  14. at call_user_func() in Middleware.php line 142
  15. at Middleware->think\{closure}() in Pipeline.php line 85
  16. at Pipeline->think\{closure}() in Pipeline.php line 66
  17. at Pipeline->then() in Route.php line 794
  18. at Route->dispatch() in Http.php line 216
  19. at Http->dispatchToRoute() in Http.php line 206
  20. at Http->think\{closure}() in Pipeline.php line 59
  21. at Pipeline->think\{closure}() in MultAccess.php line 75
  22. at MultAccess->think\admin\support\middleware\{closure}() in Pipeline.php line 59
  23. at Pipeline->think\{closure}() in Pipeline.php line 66
  24. at Pipeline->then() in MultAccess.php line 76
  25. at MultAccess->handle()
  26. at call_user_func() in Middleware.php line 142
  27. at Middleware->think\{closure}() in Pipeline.php line 85
  28. at Pipeline->think\{closure}() in LoadLangPack.php line 57
  29. at LoadLangPack->handle()
  30. at call_user_func() in Middleware.php line 142
  31. at Middleware->think\{closure}() in Pipeline.php line 85
  32. at Pipeline->think\{closure}() in JwtSession.php line 117
  33. at JwtSession->handle()
  34. at call_user_func() in Middleware.php line 142
  35. at Middleware->think\{closure}() in Pipeline.php line 85
  36. at Pipeline->think\{closure}() in Pipeline.php line 66
  37. at Pipeline->then() in Http.php line 207
  38. at Http->runWithRequest() in Http.php line 170
  39. at Http->run() in RuntimeService.php line 209
  40. 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_HOST www.tiantai.com.cn
HTTP_REFERER http://www.tiantai.com.cn/product/info/44/tentimes_land.html
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
PATH_INFO //product/info/44/tentimes_land.html
REDIRECT_STATUS 200
SERVER_NAME tiantai.com.cn
SERVER_PORT 443
SERVER_ADDR 172.21.126.135
REMOTE_PORT 33056
REMOTE_ADDR 3.84.7.255
SERVER_SOFTWARE nginx/1.22.1
GATEWAY_INTERFACE CGI/1.1
HTTPS on
REQUEST_SCHEME https
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /www/wwwroot/new_tiantai/public
DOCUMENT_URI /index.php//product/info/44/tentimes_land.html
REQUEST_URI /product/info/44/tentimes_land.html
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING
SCRIPT_FILENAME /www/wwwroot/new_tiantai/public/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php//product/info/44/tentimes_land.html
REQUEST_TIME_FLOAT 1711637417.214
REQUEST_TIME 1711637417