[8] ErrorException in IndexController.php line 547

Trying to get property 'user_id' of non-object

  1. public function company($id){
  2. $this->title = '企业详情';
  3. $this->top_nav = self::COMPANY_LIB;
  4. $info = CompanyModel::find((int)$id);
  5. if (!$info) redirect("/");
  6. $industry = $this->CategoryService->getCategoryList(CategoryModel::INDUSTRY_CODE);
  7. $industry_list = array_column($industry->toArray(),"cate_name","id");
  8. $this->assign("industry",$industry_list);
  9. //服务的项目
  10. $project = ProjectModel::where("user_id",$info->user_id)->where("status",1)
  11. ->limit(3)->order("create_time","desc")->select();
  12. //开展的活动
  13. $activity = ActivityModel::where("user_id",$info->user_id)->where("status",1)
  14. ->limit(3)->order("create_time","desc")->select();
  15. $this->assign("info",$info);
  16. $this->assign("project",$project);
  17. $this->assign("activity",$activity);
  18. return $this->fetch();

Call Stack

  1. in IndexController.php line 547
  2. at Error::appError(8, 'Trying to get proper...', '/www/wwwroot/www.ahw...', 547, ['id' => '6', 'info' => null, 'industry' => object(Collection), ...]) in IndexController.php line 547
  3. at IndexController->company('6')
  4. at ReflectionMethod->invokeArgs(object(IndexController), ['6']) in Container.php line 395
  5. at Container->invokeReflectMethod(object(IndexController), object(ReflectionMethod), ['id' => '6']) 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 469
  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 472
  18. at App->run() in index.php line 36

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
HTTP_HOST www.ahwggcyjy.com
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME www.ahwggcyjy.com
SERVER_PORT 80
SERVER_ADDR 172.26.178.73
REMOTE_PORT 54784
REMOTE_ADDR 44.223.5.218
SERVER_SOFTWARE nginx/1.14.2
GATEWAY_INTERFACE CGI/1.1
REQUEST_SCHEME http
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /www/wwwroot/www.ahwggcyjy.com/public
DOCUMENT_URI /index.php
REQUEST_URI /index/index/company/id/6.html
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/index/index/company/id/6.html
SCRIPT_FILENAME /www/wwwroot/www.ahwggcyjy.com/public/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711722592.3821
REQUEST_TIME 1711722592
Environment Variablesempty
ThinkPHP Constants
APP_DEBUG true
CMF_ROOT /www/wwwroot/www.ahwggcyjy.com/
APP_PATH /www/wwwroot/www.ahwggcyjy.com/app/
WEB_ROOT /www/wwwroot/www.ahwggcyjy.com/public/
HTMLPURIFIER_PREFIX /www/wwwroot/www.ahwggcyjy.com/vendor/ezyang/htmlpurifier/library