#0 [2]ErrorException in News.php line 92

Trying to access array offset on null

  1. ->where('id', $id)->inc('num_read')->update();
  2. $this->info = $this->app->db->table('data_news_item')
  3. ->where('id', $id)
  4. ->where('deleted', 0)
  5. ->where('status', 1)
  6. ->find();
  7. // $this->info['content'] = htmlentities( $this->info['content']);
  8. $this->menu = $this->app->db->table('data_news_marks')->where('id',$this->info['mark'])->find();
  9. // dump($this->menu);die;
  10. $this->title = $this->menu['name'] ?? '媒体聚焦';
  11. if ($this->info['mark'] == 20) {
  12. $this->keys = 1;
  13. } else {
  14. $this->keys = 2;
  15. }

Call Stack

  1. in News.php line 92
  2. at Error->appError() in News.php line 92
  3. at News->detail()
  4. at ReflectionMethod->invokeArgs() in Container.php line 349
  5. at Container->invokeReflectMethod() in Dispatch.php line 190
  6. at Dispatch->think\route\{closure}() in Pipeline.php line 59
  7. at Pipeline->think\{closure}() in Pipeline.php line 66
  8. at Pipeline->then() in Dispatch.php line 164
  9. at Dispatch->responseWithMiddlewarePipeline() in Controller.php line 112
  10. at Controller->exec() in Dispatch.php line 60
  11. at Dispatch->run() in Route.php line 717
  12. at Route->think\{closure}() in Pipeline.php line 59
  13. at Pipeline->think\{closure}() in RbacAccess.php line 68
  14. at RbacAccess->handle()
  15. at call_user_func() in Middleware.php line 134
  16. at Middleware->think\{closure}() in Pipeline.php line 85
  17. at Pipeline->think\{closure}() in Pipeline.php line 66
  18. at Pipeline->then() in Route.php line 716
  19. at Route->dispatch() in Http.php line 208
  20. at Http->dispatchToRoute() in Http.php line 198
  21. at Http->think\{closure}() in Pipeline.php line 59
  22. at Pipeline->think\{closure}() in MultAccess.php line 75
  23. at MultAccess->think\admin\support\middleware\{closure}() in Pipeline.php line 59
  24. at Pipeline->think\{closure}() in Pipeline.php line 66
  25. at Pipeline->then() in MultAccess.php line 74
  26. at MultAccess->handle()
  27. at call_user_func() in Middleware.php line 134
  28. at Middleware->think\{closure}() in Pipeline.php line 85
  29. at Pipeline->think\{closure}() in LoadLangPack.php line 53
  30. at LoadLangPack->handle()
  31. at call_user_func() in Middleware.php line 134
  32. at Middleware->think\{closure}() in Pipeline.php line 85
  33. at Pipeline->think\{closure}() in JwtSession.php line 100
  34. at JwtSession->handle()
  35. at call_user_func() in Middleware.php line 134
  36. at Middleware->think\{closure}() in Pipeline.php line 85
  37. at Pipeline->think\{closure}() in Library.php line 163
  38. at Library->think\admin\{closure}()
  39. at call_user_func() in Middleware.php line 134
  40. at Middleware->think\{closure}() in Pipeline.php line 85
  41. at Pipeline->think\{closure}() in Pipeline.php line 66
  42. at Pipeline->then() in Http.php line 197
  43. at Http->runWithRequest() in Http.php line 162
  44. at Http->run() in RuntimeService.php line 233
  45. at RuntimeService::doWebsiteInit() in index.php line 26

Environment Variables

GET Data
id 149
POST Dataempty
Filesempty
Cookies
lang zh-cn
ssid 44aaebf686f3604cae66a4483b2dd479
Sessionempty
Server/Request Data
USER nginx
HOME /var/lib/nginx
HTTP_COOKIE lang=zh-cn; ssid=44aaebf686f3604cae66a4483b2dd479
HTTP_ACCEPT_ENCODING gzip
HTTP_ACCEPT */*
HTTP_HOST www.sdbh.net
HTTP_USER_AGENT Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36
PATH_INFO
SCRIPT_FILENAME /www/bohua-v61/public/index.php
REDIRECT_STATUS 200
SERVER_NAME www.sdbh.net
SERVER_PORT 80
SERVER_ADDR 172.31.139.84
REMOTE_PORT 43784
REMOTE_ADDR 23.90.23.202
SERVER_SOFTWARE nginx/1.20.1
GATEWAY_INTERFACE CGI/1.1
REQUEST_SCHEME http
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /www/bohua-v61/public
DOCUMENT_URI /index.php
REQUEST_URI /news/detail.html?id=149
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=news/detail.html&id=149
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1795093836.9483
REQUEST_TIME 1795093836
XML 地图