[1] ErrorException in Index.php line 185

Call to a member function setInc() on null

  1. return $this->fetch();
  2. }
  3. public function pd()
  4. {
  5. $id =$this->request->param('id',0);
  6. if($id==0){
  7. abort(404);
  8. }
  9. $model = Product::get($id);
  10. $model->setInc('views');
  11. $video = Solution::where(['product'=>['like','%'.$model->name.'%']])->limit(3)->select();
  12. $this->assign([
  13. 'model'=>$model,
  14. 'video'=>$video
  15. ]);
  16. return $this->fetch();
  17. }

Call Stack

  1. in Index.php line 185
  2. at Error::appShutdown()

Environment Variables

GET Data
empty
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

USER
nginx
HOME
/home/nginx
FCGI_ROLE
RESPONDER
SCRIPT_FILENAME
/home/wwwroot/web/new-otc/public/index.php
APP_ENV
dev
QUERY_STRING
s=//pd/62
REQUEST_METHOD
GET
CONTENT_TYPE
CONTENT_LENGTH
SCRIPT_NAME
/index.php
REQUEST_URI
/pd/62
DOCUMENT_URI
/index.php
DOCUMENT_ROOT
/home/wwwroot/web/new-otc/public
SERVER_PROTOCOL
HTTP/1.1
HTTPS
on
GATEWAY_INTERFACE
CGI/1.1
SERVER_SOFTWARE
nginx/1.6.2
REMOTE_ADDR
54.160.243.44
REMOTE_PORT
46804
SERVER_ADDR
172.26.143.67
SERVER_PORT
443
SERVER_NAME
otc-china.com
REDIRECT_STATUS
200
HTTP_ACCEPT
*/*
HTTP_USER_AGENT
claudebot
HTTP_HOST
www.otc-china.com
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711668903.6089
REQUEST_TIME
1711668903
PATH_INFO
//pd/62
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/home/wwwroot/web/new-otc/public/../app/
THINK_VERSION
5.0.24
THINK_START_TIME
1711668903.6092
THINK_START_MEM
232800
EXT
.php
DS
/
THINK_PATH
/home/wwwroot/web/new-otc/thinkphp/
LIB_PATH
/home/wwwroot/web/new-otc/thinkphp/library/
CORE_PATH
/home/wwwroot/web/new-otc/thinkphp/library/think/
TRAIT_PATH
/home/wwwroot/web/new-otc/thinkphp/library/traits/
ROOT_PATH
/home/wwwroot/web/new-otc/
EXTEND_PATH
/home/wwwroot/web/new-otc/extend/
VENDOR_PATH
/home/wwwroot/web/new-otc/vendor/
RUNTIME_PATH
/home/wwwroot/web/new-otc/runtime/
LOG_PATH
/home/wwwroot/web/new-otc/runtime/log/
CACHE_PATH
/home/wwwroot/web/new-otc/runtime/cache/
TEMP_PATH
/home/wwwroot/web/new-otc/runtime/temp/
CONF_PATH
/home/wwwroot/web/new-otc/public/../app/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false