#0 [8]ErrorException in Base.php line 97

Trying to access array offset on value of type null

  1. $description = cache('base')['xxl_description'];
  2. if ($tid == 0) {
  3. View::assign('seotitle', $title);
  4. View::assign('seokeywords', $keywords);
  5. View::assign('seodescription', $description);
  6. }
  7. if ($tid) {
  8. $category = CategoryModel::where('id', $tid)->find();
  9. $seotitle = $category['title'] ? $category['title'] : $category['catname'];
  10. $seotitle = $seotitle.'-'.$title;
  11. $seokeywords = $category['keywords'] ? $category['keywords'] : $keywords;
  12. $seodescription = $category['description'] ? $category['description'] : $description;
  13. if ($id && $table) {
  14. $article = Db::name($table)->where(['id'=>$id])->find();
  15. $seotitle = $article['title'].'-'.$title;
  16. $seokeywords = $article['keywords'] ? $article['keywords'] : $category['title'].','.$keywords;
  17. $seodescription = $article['description'] ? $article['description'] : $description;

Call Stack

  1. in Base.php line 97
  2. at Error->appError() in Base.php line 97
  3. at Base->_setSEO() in News.php line 44
  4. at News->index()
  5. at ReflectionMethod->invokeArgs() in Container.php line 342
  6. at Container->invokeReflectMethod() in Controller.php line 110
  7. at Controller->think\route\dispatch\{closure}() in Pipeline.php line 59
  8. at Pipeline->think\{closure}() in Browers.php line 55
  9. at Browers->handle()
  10. at call_user_func() in Middleware.php line 142
  11. at Middleware->think\{closure}() in Pipeline.php line 84
  12. at Pipeline->think\{closure}() in Pipeline.php line 65
  13. at Pipeline->then() in Controller.php line 113
  14. at Controller->exec() in Dispatch.php line 89
  15. at Dispatch->run() in Route.php line 760
  16. at Route->think\{closure}() in Pipeline.php line 59
  17. at Pipeline->think\{closure}() in Pipeline.php line 65
  18. at Pipeline->then() in Route.php line 761
  19. at Route->dispatch() in Http.php line 210
  20. at Http->dispatchToRoute() in Http.php line 200
  21. at Http->think\{closure}() in Pipeline.php line 59
  22. at Pipeline->think\{closure}() in MultiApp.php line 71
  23. at MultiApp->think\app\{closure}() in Pipeline.php line 59
  24. at Pipeline->think\{closure}() in Pipeline.php line 65
  25. at Pipeline->then() in MultiApp.php line 72
  26. at MultiApp->handle()
  27. at call_user_func() in Middleware.php line 142
  28. at Middleware->think\{closure}() in Pipeline.php line 84
  29. at Pipeline->think\{closure}() in SessionInit.php line 67
  30. at SessionInit->handle()
  31. at call_user_func() in Middleware.php line 142
  32. at Middleware->think\{closure}() in Pipeline.php line 84
  33. at Pipeline->think\{closure}() in TraceDebug.php line 71
  34. at TraceDebug->handle()
  35. at call_user_func() in Middleware.php line 142
  36. at Middleware->think\{closure}() in Pipeline.php line 84
  37. at Pipeline->think\{closure}() in Pipeline.php line 65
  38. at Pipeline->then() in Http.php line 201
  39. at Http->runWithRequest() in Http.php line 162
  40. at Http->run() in index.php line 20

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
HTTP_HOST www.xiangxiangli.com.cn
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME xiangxiangli.com.cn
SERVER_PORT 80
SERVER_ADDR 172.28.35.203
REMOTE_PORT 57380
REMOTE_ADDR 18.205.114.205
SERVER_SOFTWARE nginx/1.22.1
GATEWAY_INTERFACE CGI/1.1
REQUEST_SCHEME http
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /www/wwwroot/xiangxiangli.com.cn/public
DOCUMENT_URI /index.php
REQUEST_URI /news/_34.html
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=//news/_34.html
SCRIPT_FILENAME /www/wwwroot/xiangxiangli.com.cn/public/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1710847193.6116
REQUEST_TIME 1710847193