[8] ErrorException in Index.php line 119

Trying to get property 'cate' of non-object

  1. return $this->fetch('wap/product/index');
  2. }
  3. return $this->fetch('pc/product/index');
  4. }
  5. public function show(){
  6. $id=input('id/d',0);
  7. $path='<i class="icon icon-right"></i> <a href="/goods/" title="名表中心">名表中心</a>';
  8. $info=$this->model->with('cate')->where('product.id',$id)->find();
  9. $cate = new Category();
  10. $pids=$cate->getParents($info->cate->id);
  11. $list=$cate->where('id','in',$pids)->field('id,name,dir,pid')->order('id asc')->select();
  12. foreach($list as $k=>$v){
  13. if($v['pid']>0){
  14. $path.='<i class="icon icon-right"></i> <a href="/goods/'.$v['dir'].'.html" title="精仿'.$v['name'].'手表">'.$v['name'].'</a>';
  15. }
  16. }
  17. $this->model->where('id',$id)->setInc('views');
  18. $fund=$this->news->where('id',14)->find();
  19. $help=$this->news->where('id',22)->find();

Call Stack

  1. in Index.php line 119
  2. at Error::appError(8, 'Trying to get proper...', '/www/wwwroot/cvshop/...', 119, ['id' => 179, 'path' => '<i class="icon icon-...', 'info' => null, ...]) in Index.php line 119
  3. at Index->show()
  4. at ReflectionMethod->invokeArgs(object(Index), []) in Container.php line 395
  5. at Container->invokeReflectMethod(object(Index), object(ReflectionMethod), ['id' => '179', '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 Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
HTTP_HOST www.mbiaohui.com
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME www.mbiaohui.com
SERVER_PORT 443
SERVER_ADDR 172.16.47.10
REMOTE_PORT 56086
REMOTE_ADDR 3.89.163.120
SERVER_SOFTWARE nginx/1.17.9
GATEWAY_INTERFACE CGI/1.1
HTTPS on
REQUEST_SCHEME https
SERVER_PROTOCOL HTTP/2.0
DOCUMENT_ROOT /www/wwwroot/cvshop/public
DOCUMENT_URI /index.php
REQUEST_URI /goods/179.html
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/goods/179.html
SCRIPT_FILENAME /www/wwwroot/cvshop/public/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711645743.351
REQUEST_TIME 1711645743
Environment Variablesempty
ThinkPHP Constants
ADDON_PATH /www/wwwroot/cvshop/addons/
MODULE_NAME index
ACTION_NAME show