#0 [0]Error in ArticleServices.php line 581

Call to undefined method stdClass::save()

  1. }
  2. /**获取一条数据
  3. * @param int $id
  4. * @return mixed
  5. */
  6. public function getInfo(int $id)
  7. {
  8. $info = $this->dao->read($id);
  9. $info->visit = $info['visit'] + 1;
  10. if (!$info->save()){
  11. throw new AdminException('请稍后查看');
  12. }
  13. // $cityInfo=app()->make(\app\services\shipping\SystemCityServices::class)->value();
  14. if ($info) {
  15. $info = $info->toArray();
  16. if(count($info['tags'])>0){
  17. $tag_list = $this->getTagUrl($info['tags']);

Call Stack

  1. in ArticleServices.php line 581
  2. at ArticleServices->getInfo() in Home.php line 246
  3. at Home->art()
  4. at ReflectionMethod->invokeArgs() in Container.php line 343
  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 89
  10. at Dispatch->run() in Route.php line 772
  11. at Route->think\{closure}() in Pipeline.php line 59
  12. at Pipeline->think\{closure}() in CmsAfterMiddleware.php line 15
  13. at CmsAfterMiddleware->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 773
  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 MultiApp.php line 71
  22. at MultiApp->think\app\{closure}() in Pipeline.php line 59
  23. at Pipeline->think\{closure}() in CmsAfterMiddleware.php line 15
  24. at CmsAfterMiddleware->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 Pipeline.php line 66
  28. at Pipeline->then() in MultiApp.php line 72
  29. at MultiApp->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 AllowCrossDomain.php line 61
  33. at AllowCrossDomain->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 LoadLangPack.php line 59
  37. at LoadLangPack->handle()
  38. at call_user_func() in Middleware.php line 142
  39. at Middleware->think\{closure}() in Pipeline.php line 85
  40. at Pipeline->think\{closure}() in SessionInit.php line 67
  41. at SessionInit->handle()
  42. at call_user_func() in Middleware.php line 142
  43. at Middleware->think\{closure}() in Pipeline.php line 85
  44. at Pipeline->think\{closure}() in Pipeline.php line 66
  45. at Pipeline->then() in Http.php line 207
  46. at Http->runWithRequest() in Http.php line 170
  47. at Http->run() in index.php line 38

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
HTTP_REFERER https://www.98.com/loupan/details/id/206.html
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
HTTP_HOST 98.com
REDIRECT_STATUS 200
SERVER_NAME 98.com
SERVER_PORT 443
SERVER_ADDR 172.16.12.91
REMOTE_PORT 55450
REMOTE_ADDR 54.224.52.210
SERVER_SOFTWARE nginx
GATEWAY_INTERFACE CGI/1.1
HTTPS on
REQUEST_SCHEME https
SERVER_PROTOCOL HTTP/2.0
DOCUMENT_ROOT /data/new98.com/public
DOCUMENT_URI /index.php
REQUEST_URI /loupan/details/id/206.html
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=//loupan/details/id/206.html
SCRIPT_FILENAME /data/new98.com/public/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1710480307.4322
REQUEST_TIME 1710480307