#0 [2]ErrorException in Chanpinxx.php line 40

Trying to access array offset on value of type null

  1. //获取素材库的二级分类
  2. $this->common();
  3. //发展历历程
  4. $this->id = input('id', '1');
  5. $this->info = $this->app->db->table('data_course')
  6. ->where('id', $this->id)
  7. ->find();
  8. $this->mark = $this->info['mark'];
  9. $this->menu = $this->app->db->table('data_course_class')
  10. ->where('id', $this->info['mark'])
  11. ->find();
  12. $this->title = $this->menu['name'] ?? '';
  13. $this->menu1 = $this->app->db->table('data_course_class')
  14. ->where('id', $this->menu['pid'])

Call Stack

  1. in Chanpinxx.php line 40
  2. at Error->appError() in Chanpinxx.php line 40
  3. at Chanpinxx->index()
  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 90
  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 Library.php line 139
  13. at Library->think\admin\{closure}()
  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 Multiple.php line 72
  22. at Multiple->think\admin\multiple\{closure}() in Pipeline.php line 59
  23. at Pipeline->think\{closure}() in Pipeline.php line 66
  24. at Pipeline->then() in Multiple.php line 73
  25. at Multiple->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 SessionInit.php line 67
  33. at SessionInit->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 SystemService.php line 484
  40. at SystemService->doInit() in index.php line 28

Environment Variables

GET Data
id 59
POST Dataempty
Filesempty
Cookies
ssid d0279b8f8544db70b03e0624aa4b97a7
lang zh-cn
Sessionempty
Server/Request Data
USER nginx
HOME /var/lib/nginx
HTTP_COOKIE ssid=d0279b8f8544db70b03e0624aa4b97a7; lang=zh-cn
HTTP_ACCEPT_ENCODING gzip
HTTP_ACCEPT */*
HTTP_HOST www.sdbh.net
HTTP_USER_AGENT Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
PATH_INFO
SCRIPT_FILENAME /www/bohua/public/index.php
REDIRECT_STATUS 200
SERVER_NAME www.sdbh.net
SERVER_PORT 80
SERVER_ADDR 172.31.139.84
REMOTE_PORT 54558
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/public
DOCUMENT_URI /index.php
REQUEST_URI /chanpinxx.html?id=59
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=chanpinxx.html&id=59
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1782310784.4785
REQUEST_TIME 1782310784
XML 地图