[8] ErrorException in Index.php line 198

Trying to access array offset on value of type null

  1. $aid = input('id');
  2. $id = id_decrypt($aid);
  3. // $where1 = 'is_pass = 1 and (pet_id = '.$this->chongwu_id.' or (classid = '.$this->chongwu_classid.' and pet_cate_id = 1))';
  4. $where1 = 'is_pass = 1 and (pet_id = '.$this->chongwu_id.')';
  5. if (isset($aid) && is_numeric($aid) && $aid >0) {
  6. $info = model('article')->where($where1)->where('id',$aid)->find();
  7. } else {
  8. $info = model('article')->where($where1)->where('id', $id)->find();
  9. }
  10. $assign['doctorxx'] = db('doctor')->field(['title', 'id', 'picurl', 'zhichen', 'address','shanchang'])->where('id', $info['doctorid'])->select();
  11. //获得前20篇和后20遍文章
  12. $where_prev = 'id < '.$info['id'];
  13. $prev20 = model('article')->field('id,title')->where($where1)->where($where_prev)->limit(20)->order('id desc')->select()->toArray();
  14. foreach ($prev20 as &$vvv){
  15. $vvv['seo_url'] = seo_url('wz/detail',$vvv['id'], '/');
  16. }
  17. $where_next = 'id > '.$info['id'];
  18. $next20 = model('article')->field('id,title,pet_id')->where($where1)->where($where_next)->limit(20)->order('id asc')->select()->toArray();

Call Stack

  1. in Index.php line 198
  2. at Error::appError() in Index.php line 198
  3. at Index->detail()
  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 init.php line 21

Environment Variables

GET Data
id dzdfzdgz
domain feileburuisilaiyaquan
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
HTTP_USER_AGENT CCBot/2.0 (https://commoncrawl.org/faq/)
HTTP_ACCEPT */*
HTTP_HOST 2.chongso.com
PATH_INFO /index/index/detail
REDIRECT_STATUS 200
SERVER_NAME 2.chongso.com
SERVER_PORT 443
SERVER_ADDR 127.0.0.1
REMOTE_PORT 60478
REMOTE_ADDR 127.0.0.1
SERVER_SOFTWARE nginx/1.24.0
GATEWAY_INTERFACE CGI/1.1
HTTPS on
REQUEST_SCHEME https
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /www/wwwroot/2.chongso.com/public
DOCUMENT_URI /init.php/index/index/detail
REQUEST_URI /init.php/index/index/detail?id=dzdfzdgz&domain=feileburuisilaiyaquan
SCRIPT_NAME /init.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING id=dzdfzdgz&domain=feileburuisilaiyaquan
SCRIPT_FILENAME /www/wwwroot/2.chongso.com/public/init.php
FCGI_ROLE RESPONDER
PHP_SELF /init.php/index/index/detail
REQUEST_TIME_FLOAT 1734059867.8112
REQUEST_TIME 1734059867
Environment Variablesempty
ThinkPHP Constantsempty