[8] ErrorException in ActivityController.php line 58

Trying to get property of non-object

  1. $this->assign('activity',$activity);
  2. return $this->fetch();
  3. }
  4. public function details()
  5. {
  6. $id = request()->param('id');
  7. $info = Model('Activity')->where('id',$id)->find();
  8. $morningTime = mktime(0,0,0,date("m"),date("d"),date("Y"));
  9. $diff = round(abs($info->endtime-$morningTime)/86400);
  10. if ($diff > 0) {
  11. $info['diff'] = "剩余".$diff."天";
  12. }else{
  13. $info['diff'] = '已结束';
  14. }
  15. // 上一套
  16. $where_p[] = ['id' , '>' ,$info->id];
  17. $page['prve'] = Model('Activity')->page($where_p,'id asc');
  18. // 下一套

Call Stack

  1. in ActivityController.php line 58
  2. at Error::appError(8, 'Trying to get proper...', '/www/wwwroot/www.glx...', 58, ['id' => '1', 'info' => null, 'morningTime' => 1711555200]) in ActivityController.php line 58
  3. at ActivityController->details()
  4. at ReflectionMethod->invokeArgs(object(ActivityController), []) in Container.php line 395
  5. at Container->invokeReflectMethod(object(ActivityController), object(ReflectionMethod), ['c' => 'Activity', 'a' => 'details', 'id' => '1', ...]) in Module.php line 132
  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 137
  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 start.php line 41
  19. at require('/www/wwwroot/www.glx...') in index.php line 43

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
FCGI_ROLE RESPONDER
SCRIPT_FILENAME /www/wwwroot/www.glxyzs.com/public/index.php
QUERY_STRING
REQUEST_METHOD GET
CONTENT_TYPE
CONTENT_LENGTH
SCRIPT_NAME /index.php
REQUEST_URI /index.php/Activity/details/1.html
DOCUMENT_URI /index.php/Activity/details/1.html
DOCUMENT_ROOT /www/wwwroot/www.glxyzs.com/public
SERVER_PROTOCOL HTTP/1.1
REQUEST_SCHEME http
GATEWAY_INTERFACE CGI/1.1
SERVER_SOFTWARE nginx/1.16.0
REMOTE_ADDR 44.200.77.59
REMOTE_PORT 54852
SERVER_ADDR 172.18.135.6
SERVER_PORT 80
SERVER_NAME www.glxyzs.com
REDIRECT_STATUS 200
PATH_INFO /Activity/details/1.html
HTTP_ACCEPT */*
HTTP_USER_AGENT claudebot
HTTP_HOST www.glxyzs.com
PHP_SELF /index.php/Activity/details/1.html
REQUEST_TIME_FLOAT 1711639964.1741
REQUEST_TIME 1711639964
Environment Variablesempty
ThinkPHP Constants
APP_PATH /www/wwwroot/www.glxyzs.com/public/../application/
APP_NAME APP
APP_DEBUG true