[8] ErrorException in DocumentCategory.php line 40

Trying to get property 'id' of non-object

  1. ->join('document_model m','c.model_id = m.id', 'left')
  2. ->select();
  3. return list_for_level($list);
  4. }
  5. public function find($cat_id)
  6. {
  7. $catInfo = $this->where('id', $cat_id)->find();
  8. $catInfo->url = url('index/category/index', ['cat_id' => $catInfo->id]);
  9. return $catInfo;
  10. }
  11. public function getCategoryById($site_id, $id)
  12. {
  13. return self::where('site_id', '=', $site_id)
  14. ->where('id', $id)
  15. ->find();
  16. }

Call Stack

  1. in DocumentCategory.php line 40
  2. at Error::appError(8, 'Trying to get proper...', '/www/wwwroot/www.xta...', 40, ['cat_id' => '66', 'catInfo' => null]) in DocumentCategory.php line 40
  3. at DocumentCategory->find('66') in Category.php line 25
  4. at Category->index()
  5. at ReflectionMethod->invokeArgs(object(Category), []) in Container.php line 395
  6. at Container->invokeReflectMethod(object(Category), object(ReflectionMethod), ['cat_id' => '66', 'convert' => false]) in Module.php line 131
  7. at Module->think\route\dispatch\{closure}(object(Request), object(Closure), null)
  8. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  9. at Middleware->think\{closure}(object(Request))
  10. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  11. at Middleware->dispatch(object(Request), 'controller') in Module.php line 136
  12. at Module->exec() in Dispatch.php line 168
  13. at Dispatch->run() in App.php line 432
  14. at App->think\{closure}(object(Request), object(Closure), null)
  15. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  16. at Middleware->think\{closure}(object(Request))
  17. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  18. at Middleware->dispatch(object(Request)) in App.php line 435
  19. at App->run() in index.php line 21

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Session
index { "site_id": 1 }
Server/Request Data
USER www
HOME /home/www
HTTP_CF_CONNECTING_IP 54.92.135.47
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
HTTP_CF_VISITOR {"scheme":"https"}
HTTP_X_FORWARDED_PROTO https
HTTP_CF_RAY 86bffcb78d0c0835-IAD
HTTP_X_FORWARDED_FOR 54.92.135.47
HTTP_ACCEPT_ENCODING gzip, br
HTTP_CF_IPCOUNTRY US
HTTP_CDN_LOOP cloudflare
HTTP_HOST www.xtalong.com
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME www.xtalong.com
SERVER_PORT 443
SERVER_ADDR 10.8.165.124
REMOTE_PORT 14186
REMOTE_ADDR 172.70.38.8
SERVER_SOFTWARE nginx/1.21.4
GATEWAY_INTERFACE CGI/1.1
HTTPS on
REQUEST_SCHEME https
SERVER_PROTOCOL HTTP/2.0
DOCUMENT_ROOT /www/wwwroot/www.xtalong.com
DOCUMENT_URI /index.php
REQUEST_URI /channel-66.html
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/channel-66.html
SCRIPT_FILENAME /www/wwwroot/www.xtalong.com/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711716643.0584
REQUEST_TIME 1711716643
Environment Variablesempty
ThinkPHP Constants
QINIU_FUNCTIONS_VERSION 7.2.9