[8] ErrorException in Information.php line 98

Trying to access array offset on value of type null

  1. }
  2. public function details($id)
  3. {
  4. if (input('lang')==null||input('lang')=='ch'){
  5. $data = Db::name('ch_information')
  6. ->where('id',$id)
  7. ->find();
  8. $last = Db::name('ch_information')
  9. ->where("(sort = {$data['sort']} and create_time > {$data['create_time']}) or sort > {$data['sort']}")
  10. ->order(['sort'=>'asc','create_time'=>'asc'])
  11. ->find();
  12. $next = Db::name('ch_information')
  13. ->where("(sort = {$data['sort']} and create_time < {$data['create_time']}) or sort < {$data['sort']}")
  14. ->order(['sort'=>'desc','create_time'=>'desc'])
  15. ->find();
  16. // $where = [];
  17. // if($id == 1){
  18. // $where['id'] = ['not in',$id];

Call Stack

  1. in Information.php line 98
  2. at Error::appError() in Information.php line 98
  3. at Information->details()
  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 21

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
PATH_TRANSLATED redirect:/index.php/informationDetails/487/487
PATH_INFO /informationDetails/487
SCRIPT_NAME /index.php
REQUEST_URI /informationDetails/487
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.1
GATEWAY_INTERFACE CGI/1.1
REDIRECT_URL /informationDetails/487
REMOTE_PORT 41786
SCRIPT_FILENAME /www/wwwroot/www.bianfanyi.com/public/index.php
SERVER_ADMIN webmaster@example.com
CONTEXT_DOCUMENT_ROOT /www/wwwroot/www.bianfanyi.com/public
CONTEXT_PREFIX
REQUEST_SCHEME http
DOCUMENT_ROOT /www/wwwroot/www.bianfanyi.com/public
REMOTE_ADDR 52.55.55.239
SERVER_PORT 80
SERVER_ADDR 172.17.23.254
SERVER_NAME www.bianfanyi.com
SERVER_SOFTWARE Apache
SERVER_SIGNATURE <address>Apache Server at www.bianfanyi.com Port 80</address>
LD_LIBRARY_PATH /www/server/apache/lib
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
HTTP_HOST www.bianfanyi.com
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
proxy-nokeepalive 1
REDIRECT_STATUS 200
FCGI_ROLE RESPONDER
PHP_SELF /index.php/informationDetails/487
REQUEST_TIME_FLOAT 1711658409.3775
REQUEST_TIME 1711658409
Environment Variablesempty
ThinkPHP Constantsempty