[8] ErrorException in CaseController.php line 190

Trying to get property of non-object

  1. $this->assign('hot',$hot);
  2. return $this->fetch();
  3. }
  4. public function detail()
  5. {
  6. $id = request()->param('id');
  7. $casesInfo = Model('Cases')->casesInfo($id);
  8. // 封面图
  9. $casesInfo->thumbpic = Model('CasesImg')->thumbpicList($casesInfo->id);
  10. // 风格
  11. $casesInfo->style = Model('Category')->where('id',$casesInfo->style)->value('category');
  12. // 户型
  13. $casesInfo->apa = Model('Category')->where('id',$casesInfo->apa)->value('category');
  14. // 楼盘
  15. $casesInfo->lname = Model('Category')->where('id',$casesInfo->lid)->value('category');
  16. // 设计师
  17. $design=explode(',',$casesInfo->sid);
  18. foreach($design as $v){

Call Stack

  1. in CaseController.php line 190
  2. at Error::appError(8, 'Trying to get proper...', '/www/wwwroot/www.glx...', 190, ['id' => '449', 'casesInfo' => null]) in CaseController.php line 190
  3. at CaseController->detail()
  4. at ReflectionMethod->invokeArgs(object(CaseController), []) in Container.php line 395
  5. at Container->invokeReflectMethod(object(CaseController), object(ReflectionMethod), ['c' => 'Case', 'a' => 'detail', 'id' => '449', ...]) 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 s=/Case/detail/449.html
REQUEST_METHOD GET
CONTENT_TYPE
CONTENT_LENGTH
SCRIPT_NAME /index.php
REQUEST_URI /Case/detail/449.html
DOCUMENT_URI /index.php
DOCUMENT_ROOT /www/wwwroot/www.glxyzs.com/public
SERVER_PROTOCOL HTTP/2.0
REQUEST_SCHEME https
HTTPS on
GATEWAY_INTERFACE CGI/1.1
SERVER_SOFTWARE nginx/1.16.0
REMOTE_ADDR 44.202.183.118
REMOTE_PORT 47226
SERVER_ADDR 172.18.135.6
SERVER_PORT 443
SERVER_NAME www.glxyzs.com
REDIRECT_STATUS 200
PATH_INFO
HTTP_HOST www.glxyzs.com
HTTP_ACCEPT */*
HTTP_USER_AGENT claudebot
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711645738.3973
REQUEST_TIME 1711645738
Environment Variablesempty
ThinkPHP Constants
APP_PATH /www/wwwroot/www.glxyzs.com/public/../application/
APP_NAME APP
APP_DEBUG true