#0 [2]ErrorException in BocSeo.php line 41

Undefined array key "id"

  1. {
  2. $key = 'seo-'.$c.'-'.$a;
  3. $cache_tag = 'seo';
  4. $info = Cache::get($key);
  5. if(empty($info)) {
  6. $Boc_menu = new BocMenu();
  7. $p = $Boc_menu->field('id')->where(['pid'=>0,'key'=>$c,'status'=>1,'is_deleted'=>0])->findOrEmpty()->toArray();
  8. //没有子集,使用父级seo
  9. if(empty($a) || $a == 'index'){
  10. $menu_id = $p['id'];
  11. }
  12. $c = $Boc_menu->field('id')->where(['pid'=>$p['id'],'key'=>$a,'status'=>1,'is_deleted'=>0])->findOrEmpty()->toArray();
  13. if(empty($c)){
  14. //子集没有设置seo,使用父级seo
  15. $menu_id = $p['id'];
  16. }else{
  17. //获取子集seo
  18. $menu_id = $c['id'];
  19. }

Call Stack

  1. in BocSeo.php line 41
  2. at Error->appError() in BocSeo.php line 41
  3. at BocSeo->get_info() in Base.php line 37
  4. at Base->initialize() in Controller.php line 95
  5. at Controller->__construct()
  6. at ReflectionClass->newInstanceArgs() in Container.php line 397
  7. at Container->invokeClass() in Container.php line 254
  8. at Container->make() in Controller.php line 108
  9. at Controller->controller() in Controller.php line 83
  10. at Controller->exec() in Dispatch.php line 56
  11. at Dispatch->run() in Route.php line 713
  12. at Route->think\{closure}() in Pipeline.php line 59
  13. at Pipeline->think\{closure}() in RbacAccess.php line 71
  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 712
  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 77
  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 76
  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 101
  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 140
  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 234
  45. at RuntimeService::doWebsiteInit() in index.php line 23

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookies
lang zh-cn
ssid 6a3485ba668922b82f26441f1f16683b
SITE_TOTAL_ID f969e65c41497e49079b96da5a44f587
server_name_session 883d0a217d346f55ce377c29c22ae994
Sessionempty
Server/Request Data
USER www
HOME /home/www
HTTP_COOKIE lang=zh-cn; ssid=6a3485ba668922b82f26441f1f16683b; SITE_TOTAL_ID=f969e65c41497e49079b96da5a44f587; server_name_session=883d0a217d346f55ce377c29c22ae994
HTTP_ACCEPT_ENCODING gzip
HTTP_ACCEPT */*
HTTP_USER_AGENT Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
PATH_INFO
HTTP_HOST www.qdfg.cn
REDIRECT_STATUS 200
SERVER_NAME www.qdfg.cn
SERVER_PORT 443
SERVER_ADDR 172.21.126.145
REMOTE_PORT 57994
REMOTE_ADDR 104.140.79.58
SERVER_SOFTWARE nginx/1.26.3
GATEWAY_INTERFACE CGI/1.1
HTTPS on
REQUEST_SCHEME https
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /www/wwwroot/fengguang/public
DOCUMENT_URI /index.php
REQUEST_URI /contact.html
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/contact.html
SCRIPT_FILENAME /www/wwwroot/fengguang/public/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1762173844.2818
REQUEST_TIME 1762173844
XML 地图