红宝石hbs0022(中国)搜狗百科

[8] ErrorException in Article.php line 22

Trying to access array offset on value of type null

  1. {
  2. $urlname = config('urlname');
  3. //获取后台站点文章分页配置信息
  4. $article_pagesize = config('config.plus_article_page');
  5. $pagesize = $article_pagesize ? $article_pagesize : 15;//若为空,默认调取15条
  6. if ($urlname) {
  7. //查指定分类用分类tdk
  8. $tdk = db('article_category')->where(['is_check' => 1, 'urlname' => $urlname])->field('id,category,urlname,parentid,seo_title,seo_keywords,seo_description')->find();
  9. //获取该类的文章
  10. $cate_id = $tdk['id'];
  11. $cate_all = db('article_category')->where('is_check',1)->field('id,parentid,category')->select();
  12. $Category = new \Category();
  13. $cateid_arr = $Category->getChildCatelist($cate_all,$cate_id);//根据当前栏目cate_id获取其所有子级栏目的id
  14. $cateid_str = trim($cate_id.','. implode(',',$cateid_arr),',');
  15. $article_list = model('Article')->getAllArticleDataById($cateid_str,$pagesize);
  16. //查子类
  17. $article_category = db('article_category')->where(['is_check' => 1, 'parentid' => $tdk['id']])->select();
  18. if (!$article_category) {
  19. //查同类

Call Stack

  1. in Article.php line 22
  2. at Error::appError() in Article.php line 22
  3. at Article->lists()
  4. at ReflectionMethod->invokeArgs() in Container.php line 395
  5. at Container->invokeReflectMethod() in Module.php line 131
  6. at Module->think\route\dispatch\{closure}()
  7. at call_user_func_array() in Middleware.php line 185
  8. at Middleware->think\{closure}()
  9. at call_user_func() in Middleware.php line 130
  10. at Middleware->dispatch() in Module.php line 136
  11. at Module->exec() in Dispatch.php line 168
  12. at Dispatch->run() in App.php line 432
  13. at App->think\{closure}()
  14. at call_user_func_array() in Middleware.php line 185
  15. at Middleware->think\{closure}()
  16. at call_user_func() in Middleware.php line 130
  17. at Middleware->dispatch() in App.php line 435
  18. at App->run() in index.php line 30

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookies
PHPSESSID a507nv8asslmiil1n9s62e0ib4
BAEID FEC8DA2EBFE2DA615D0390B7A8C52B41
Sessionempty
Server/Request Data
USER www
HOME /home/www
HTTP_COOKIE PHPSESSID=a507nv8asslmiil1n9s62e0ib4; BAEID=FEC8DA2EBFE2DA615D0390B7A8C52B41
HTTP_ACCEPT_ENCODING gzip
HTTP_ACCEPT */*
HTTP_USER_AGENT CCBot/2.0 (https://commoncrawl.org/faq/)
HTTP_CONNECTION close
HTTP_X_FORWARDED_FOR 104.206.148.110
HTTP_X_REAL_IP 104.206.148.110
HTTP_HOST www.ahldf.com.cn
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME 127.0.0.1_8007
SERVER_PORT 8007
SERVER_ADDR 192.168.0.126
REMOTE_PORT 56335
REMOTE_ADDR 192.168.0.9
SERVER_SOFTWARE nginx/1.24.0
GATEWAY_INTERFACE CGI/1.1
REQUEST_SCHEME http
SERVER_PROTOCOL HTTP/1.0
DOCUMENT_ROOT /www/wwwroot/ahldf.com.cn
DOCUMENT_URI /index.php
REQUEST_URI /article/cjwt.html
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/article/cjwt.html
SCRIPT_FILENAME /www/wwwroot/ahldf.com.cn/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1721422266.8764
REQUEST_TIME 1721422266
Environment Variablesempty
ThinkPHP Constants
DS /
APP_PATH /www/wwwroot/ahldf.com.cn/./application/
CONF_PATH /www/wwwroot/ahldf.com.cn/./config/
PUBILC_PATH /www/wwwroot/ahldf.com.cn/
ROOT_PATH /www/wwwroot/ahldf.com.cn
CACHE_PATH /www/wwwroot/ahldf.com.cn/./runtime/
CONFIG_PATH /www/wwwroot/ahldf.com.cn/./config/
UPLOAD_PATH uploads