[8] ErrorException in Index.php line 109

Trying to access array offset on value of type null

  1. {
  2. //tdk,banner
  3. $parole=session('parole');$tdk=tdk(4,$parole);$this->assign("tdk",$tdk);$banner=banner(4);$this->assign('banner',$banner);
  4. //页面
  5. $map['p']=input('p');$map['id']=Request::param('id');$map['keys']=Request::param('keys');$this->assign('map',$map);
  6. if($map['keys']!=''){if($parole=='1'){$where[]=["chinese","like","%".$map['keys']."%"];}else{$where[]=["english","like","%".$map['keys']."%"];}}
  7. else
  8. {
  9. if($map['id']!=''){$data=Db::name("column")->find($map['id']);}else{$data=Db::name("column")->where("`boss`='4'")->order("sort asc")->find();}$this->assign('data',$data);
  10. $where[]=["cid","eq",$data['id']];
  11. }
  12. $list=Db::name("product")->where($where)->order("sort desc")->select();$this->assign("list",$list);
  13. return $this->fetch('Index/product');
  14. }
  15. public function propage()
  16. {
  17. //tdk,banner
  18. $parole=session('parole');$tdk=tdk(4,$parole);$this->assign("tdk",$tdk);$banner=banner(4);$this->assign('banner',$banner);
  19. if(session('parole')){$parole=session('parole');}else{$parole=1;}

Call Stack

  1. in Index.php line 109
  2. at Error::appError() in Index.php line 109
  3. at Index->product()
  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 12

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Session
think { "parole": 1 }
Server/Request Data
USER www
HOME /home/www
HTTP_HOST jinyumf.com
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME chuanglilaixin.hjyhy.com.cn
SERVER_PORT 80
SERVER_ADDR 172.21.51.255
REMOTE_PORT 55106
REMOTE_ADDR 54.147.30.127
SERVER_SOFTWARE nginx/1.20.2
GATEWAY_INTERFACE CGI/1.1
REQUEST_SCHEME http
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /www/wwwroot/chuanglilaixin
DOCUMENT_URI /index.php
REQUEST_URI /index.php?s=/product/id/525.html
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/product/id/525.html
SCRIPT_FILENAME /www/wwwroot/chuanglilaixin/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711724428.8773
REQUEST_TIME 1711724428
Environment Variablesempty
ThinkPHP Constants
APP_PATH /www/wwwroot/chuanglilaixin/application/
QINIU_FUNCTIONS_VERSION 7.3.0