[8] ErrorException in WriterController.php line 40

Trying to access array offset on value of type null

  1. return $this->fetch();
  2. }
  3. public function writerDetails($id, GuArticle $model)
  4. {
  5. $data = $model::get($id);
  6. $model->uvInc($id);
  7. $this->assign([
  8. 'data' => $data,
  9. 'userData' => $model->userData($data['u_id'], $data->getData('a_status')),
  10. 'webname' => $data['title'],
  11. 'articleTitle' => $model->detailsName($id),
  12. 'model' => $model,
  13. 'webthumb' => $data['thumb']!=''?$data['thumb']:'http://www.sdswxh.com/public/static/index/img/mylogo.jpg',
  14. 'webdesc' => $data['describe']!=''?$data['describe']:'当代散文网是由山东省散文学会主办,学会成立于1986年,是由山东省作家协会主管、山东省社科联业务指导,在山东省民政厅登记注册的省一级法人学术社会团体,成立三十年多年来,学会以发展山东散文事业,,团结全省散文家、散文作者,推动散文创作,培养人才推出作品为己任,举办了大量散文活动,是全国散文界卓有影响的专业团体,被评为山东省优秀学会。学会办有《当代散文》双月刊,当代散文网、当代散文家官方公众号平台,现有会员2000余人。',
  15. 'login' => $this->isLogin(),
  16. 'comm' => $model->comment()->where(['a_id'=>$id,'com_status'=>1])->select(),
  17. ]);
  18. return $this->fetch();

Call Stack

  1. in WriterController.php line 40
  2. at Error::appError() in WriterController.php line 40
  3. at WriterController->writerDetails()
  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.sdswxh.com
HTTP_REFERER http://sdswxh.com/public/index.php/writerdetails/207.html
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
PATH_INFO /writerdetails/207.html
REDIRECT_STATUS 200
SERVER_NAME sdswxh.com
SERVER_PORT 80
SERVER_ADDR 172.21.243.221
REMOTE_PORT 32824
REMOTE_ADDR 34.230.35.103
SERVER_SOFTWARE nginx/1.21.4
GATEWAY_INTERFACE CGI/1.1
REQUEST_SCHEME http
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /www/wwwroot/sdswxh.com
DOCUMENT_URI /public/index.php/writerdetails/207.html
REQUEST_URI /public/index.php/writerdetails/207.html
SCRIPT_NAME /public/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING
SCRIPT_FILENAME /www/wwwroot/sdswxh.com/public/index.php
FCGI_ROLE RESPONDER
PHP_SELF /public/index.php/writerdetails/207.html
REQUEST_TIME_FLOAT 1711637901.02
REQUEST_TIME 1711637901
Environment Variablesempty
ThinkPHP Constants
FILTER_VALIDATE_BOOL 258
HTMLPURIFIER_PREFIX /www/wwwroot/sdswxh.com/vendor/ezyang/htmlpurifier/library
URL_CURRENT url://current
URL_RELOAD url://reload
URL_BACK url://back