#0 [0]Error in ProductController.php line 112

Call to a member function toArray() on null

  1. $data = $model->where('artid', $param['artid'])->page((int)$param['page'], 6)->order('sort desc,id desc')->select()->toArray();
  2. return json($data);
  3. }
  4. public function show()
  5. {
  6. $id = input('id');
  7. $show = Product::where('id=' . $id)->append(['attestation_list'])->find()->toArray();
  8. $show['identifying'] = explode(',', $show['identifying']);
  9. $classy = ProductCate::where('id', $show['artid'])->find();
  10. $newslist = Product::where('artid', $show['artid'])->where('xilie', $show['xilie'])->where('id', '<>', $id)->order('sort desc, id desc')->select();
  11. $this->assign(array(
  12. 'show' => $show,
  13. 'classy' => $classy,
  14. 'newslist' => $newslist,

Call Stack

  1. in ProductController.php line 112
  2. at ProductController->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 90
  9. at Dispatch->run() in Route.php line 772
  10. at Route->think\{closure}() in Pipeline.php line 59
  11. at Pipeline->think\{closure}() in Pipeline.php line 66
  12. at Pipeline->then() in Route.php line 773
  13. at Route->dispatch() in Http.php line 216
  14. at Http->dispatchToRoute() in Http.php line 206
  15. at Http->think\{closure}() in Pipeline.php line 59
  16. at Pipeline->think\{closure}() in MultiApp.php line 71
  17. at MultiApp->think\app\{closure}() in Pipeline.php line 59
  18. at Pipeline->think\{closure}() in SessionInit.php line 67
  19. at SessionInit->handle()
  20. at call_user_func() in Middleware.php line 142
  21. at Middleware->think\{closure}() in Pipeline.php line 85
  22. at Pipeline->think\{closure}() in Pipeline.php line 66
  23. at Pipeline->then() in MultiApp.php line 72
  24. at MultiApp->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 TraceDebug.php line 71
  28. at TraceDebug->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 Pipeline.php line 66
  32. at Pipeline->then() in Http.php line 207
  33. at Http->runWithRequest() in Http.php line 170
  34. at Http->run() in index.php line 20

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
HTTP_HOST sdgyrq.com
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME sdgyrq.com
SERVER_PORT 80
SERVER_ADDR 172.21.243.221
REMOTE_PORT 59386
REMOTE_ADDR 54.205.238.173
SERVER_SOFTWARE nginx/1.21.4
GATEWAY_INTERFACE CGI/1.1
REQUEST_SCHEME http
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /www/wwwroot/new.sdgyrq.com/public
DOCUMENT_URI /index.php
REQUEST_URI /index/productdetail/5.html
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/index/productdetail/5.html
SCRIPT_FILENAME /www/wwwroot/new.sdgyrq.com/public/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711623767.915
REQUEST_TIME 1711623767