[2] ErrorException in News.php line 179

Creating default object from empty value

  1. return json(msg(1, $str,$list->currentPage() + 1));
  2. }
  3. public function detail()
  4. {
  5. $id = $this->request->param('id');
  6. $data = Model::get($id);
  7. $data->click += 1;
  8. $data->save();
  9. $list = Model::order('add_time desc')->with('tagrelation')
  10. ->orderRand()->limit(4)->select();
  11. $seo['title']=$data['title'];
  12. $seo['key_word']=$data['key_word'];
  13. $seo['discription']=$data['discription'];
  14. $hot = Model::where('is_top', 1)->field('id,title,add_time,discription,img')->order('add_time desc')->withAttr('add_time', function ($value) {

Call Stack

  1. in News.php line 179
  2. at Error::appError(2, 'Creating default obj...', '/www/wwwroot/www.zho...', 179, ['id' => '16', 'data' => object(stdClass)]) in News.php line 179
  3. at News->detail()
  4. at ReflectionMethod->invokeArgs(object(News), []) in Container.php line 395
  5. at Container->invokeReflectMethod(object(News), object(ReflectionMethod), ['id' => '16', 'convert' => false]) in Module.php line 131
  6. at Module->think\route\dispatch\{closure}(object(Request), object(Closure), null)
  7. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  8. at Middleware->think\{closure}(object(Request))
  9. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  10. at Middleware->dispatch(object(Request), 'controller') 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}(object(Request), object(Closure), null)
  14. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  15. at Middleware->think\{closure}(object(Request))
  16. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  17. at Middleware->dispatch(object(Request)) in App.php line 435
  18. at App->run() in index.php line 21

Environment Variables

GET Data
id 16
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
HTTP_HOST www.zhonweb.com
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME www.zhonweb.com
SERVER_PORT 80
SERVER_ADDR 172.16.165.193
REMOTE_PORT 59716
REMOTE_ADDR 52.90.40.84
SERVER_SOFTWARE nginx/1.22.1
GATEWAY_INTERFACE CGI/1.1
REQUEST_SCHEME http
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /www/wwwroot/www.zhonweb.com/root
DOCUMENT_URI /index.php
REQUEST_URI /newsDetail.html?id=16
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/newsDetail.html&id=16
SCRIPT_FILENAME /www/wwwroot/www.zhonweb.com/root/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711625518.5153
REQUEST_TIME 1711625518
Environment Variablesempty
ThinkPHP Constants
SESSION_EXP_TIME 3600
DS /
APP_PATH /www/wwwroot/www.zhonweb.com/root/
ROOT_PATH /www/wwwroot/www.zhonweb.com/
EXTEND_PATH /www/wwwroot/www.zhonweb.com/extend/