#0 [2]ErrorException in common.php line 290

Creating default object from empty value

  1. $id = input('id', 0);
  2. }
  3. if ($id == 0) {
  4. return [];
  5. }
  6. $model = new ArticleModel();
  7. $article = $model->find($id);
  8. // 更新预览量
  9. ++$article->view;
  10. $article->save();
  11. if (!$article) {
  12. throw new \Exception(sprintf('函数: %s, 参数 id = %s 数据不存在!', __FUNCTION__, $id));
  13. } else {
  14. return $article->toArray();
  15. }
  16. }
  17. }

Call Stack

  1. in common.php line 290
  2. at Error->appError() in common.php line 290
  3. at sp_article_details() in 90b65ae7e7a168595c9ce584ea060117.php line 2
  4. at include('/www/wwwroot/dongshe...') in File.php line 59
  5. at File->read() in Template.php line 255
  6. at Template->fetch() in Think.php line 149
  7. at Think->fetch() in View.php line 90
  8. at View->think\{closure}() in View.php line 126
  9. at View->getContent() in View.php line 91
  10. at View->fetch()
  11. at call_user_func_array() in Facade.php line 96
  12. at Facade::__callStatic() in common.php line 394
  13. at sp_page_html() in ErrorController.php line 11
  14. at ErrorController->__call()
  15. at ReflectionMethod->invokeArgs() in Container.php line 344
  16. at Container->invokeReflectMethod() in Controller.php line 110
  17. at Controller->think\route\dispatch\{closure}() in Pipeline.php line 59
  18. at Pipeline->think\{closure}() in Stat.php line 19
  19. at Stat->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 Controller.php line 113
  24. at Controller->exec() in Dispatch.php line 80
  25. at Dispatch->run() in Route.php line 793
  26. at Route->think\{closure}() in Pipeline.php line 59
  27. at Pipeline->think\{closure}() in Pipeline.php line 66
  28. at Pipeline->then() in Route.php line 794
  29. at Route->dispatch() in Http.php line 216
  30. at Http->dispatchToRoute() in Http.php line 206
  31. at Http->think\{closure}() in Pipeline.php line 59
  32. at Pipeline->think\{closure}() in MultiApp.php line 51
  33. at MultiApp->think\app\{closure}() in Pipeline.php line 59
  34. at Pipeline->think\{closure}() in Pipeline.php line 66
  35. at Pipeline->then() in MultiApp.php line 52
  36. at MultiApp->handle()
  37. at call_user_func() in Middleware.php line 142
  38. at Middleware->think\{closure}() in Pipeline.php line 85
  39. at Pipeline->think\{closure}() in SessionInit.php line 67
  40. at SessionInit->handle()
  41. at call_user_func() in Middleware.php line 142
  42. at Middleware->think\{closure}() in Pipeline.php line 85
  43. at Pipeline->think\{closure}() in Pipeline.php line 66
  44. at Pipeline->then() in Http.php line 207
  45. at Http->runWithRequest() in Http.php line 170
  46. at Http->run() in index.php line 20

Environment Variables

GET Data
/products/3_html
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
SCRIPT_NAME /index.php
REQUEST_URI /products/3.html
QUERY_STRING /products/3.html
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.1
GATEWAY_INTERFACE CGI/1.1
REDIRECT_QUERY_STRING /products/3.html
REDIRECT_URL /products/3.html
REMOTE_PORT 48672
SCRIPT_FILENAME /www/wwwroot/dongsheng-jx.com/public/index.php
SERVER_ADMIN webmaster@example.com
CONTEXT_DOCUMENT_ROOT /www/wwwroot/dongsheng-jx.com/public
CONTEXT_PREFIX
REQUEST_SCHEME http
DOCUMENT_ROOT /www/wwwroot/dongsheng-jx.com/public
REMOTE_ADDR 3.237.189.116
SERVER_PORT 80
SERVER_ADDR 172.16.140.193
SERVER_NAME www.dongsheng-jx.com
SERVER_SOFTWARE Apache
SERVER_SIGNATURE <address>Apache Server at www.dongsheng-jx.com Port 80</address>
LD_LIBRARY_PATH /www/server/apache/lib
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HTTP_HOST www.dongsheng-jx.com
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
proxy-nokeepalive 1
REDIRECT_STATUS 200
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711694986.1529
REQUEST_TIME 1711694986