[8] ErrorException in Player.php line 11

Trying to access array offset on value of type null

  1. namespace app\index\controller;
  2. use app\index\model\Player as PlayerModel;
  3. class Player extends Base
  4. {
  5. public function player()
  6. {
  7. $filename=input('filename');
  8. $filename=$filename.'.html';
  9. $articleall=db('news')->where('filename',$filename)->find();
  10. $articleid=$articleall['id'];
  11. db('news')->where('id',$articleid)->setinc('click');
  12. $classname=db('cate')->field('classname')->find($articleall['classid']);
  13. $keyall = explode(',',$articleall['keywords']);
  14. foreach ($keyall as $k => $v){
  15. $keyall[$k] = '%'.$v.'%';
  16. }
  17. $abcount = db('news')->where('title','like',$keyall,'or')->where('id','<>',$articleid)->count();
  18. $articleabout = db('news')->where('title','like',$keyall,'or')->where('id','<>',$articleid)->limit(10)->order('id','desc')->select();
  19. //dump($articleabout);die;

Call Stack

  1. in Player.php line 11
  2. at Error::appError() in Player.php line 11
  3. at Player->player()
  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
HTTP_HOST www.bjcsyp.com.cn
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME www.bjcsyp.com.cn
SERVER_PORT 80
SERVER_ADDR 10.0.8.16
REMOTE_PORT 56254
REMOTE_ADDR 34.227.191.136
SERVER_SOFTWARE nginx/1.22.1
GATEWAY_INTERFACE CGI/1.1
REQUEST_SCHEME http
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /www/wwwroot/csyp/public
DOCUMENT_URI /index.php
REQUEST_URI /player/16.html
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/player/16.html
SCRIPT_FILENAME /www/wwwroot/csyp/public/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711664127.8707
REQUEST_TIME 1711664127
Environment Variablesempty
ThinkPHP Constants
HS_APPID wxbc3506a7fce67f10
HS_SECRET 2016bb584b30ae7f7e17d8722895e9c0
HS_DS /
HS_ROOT /www/wwwroot/csyp/application/
HS_CONTROLLERS /www/wwwroot/csyp/application/controllers/
HS_MODELS /www/wwwroot/csyp/application/models/
HS_TOOLS /www/wwwroot/csyp/application/tools/