[8] ErrorException in Articles.php line 202

Trying to get property 'user_id' of non-object

  1. //获取宠家号作者
  2. $Author = Author::get(array('user_id'=>$Article->user_id,'status'=>1));
  3. if($Author){
  4. $Author->setInc("views", 1);
  5. }
  6. $this->assign('Author', $Author);
  7. //登录用户关注作者,收藏文章
  8. $follow = array( 'uid'=>$Author->user_id );
  9. $article_collected = false;
  10. if($this->auth->isLogin()){
  11. //浏览记录
  12. $view = array(
  13. 'type'=>8,
  14. 'user_id'=>$this->auth->id,
  15. 'source_id'=>$Article->id,
  16. 'source_title'=>$Article->title,

Call Stack

  1. in Articles.php line 202
  2. at Error::appError(8, 'Trying to get proper...', '/www/wwwroot/www.pet...', 202, ['id' => '5938', 'preview' => null, 'Article' => object(Archives), ...]) in Articles.php line 202
  3. at Articles->article()
  4. at ReflectionMethod->invokeArgs(object(Articles), []) in App.php line 343
  5. at App::invokeMethod([object(Articles), 'article'], []) in App.php line 611
  6. at App::module(['chongjiahao', 'articles', 'article'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 456
  7. at App::exec(['type' => 'module', 'module' => ['chongjiahao', 'articles', 'article'], 'convert' => false], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  8. at App::run() in start.php line 19
  9. at require('/www/wwwroot/www.pet...') in index.php line 23

Environment Variables

GET Data
empty
POST Data
empty
Files
empty

Cookies

guest_city
think:{"country":"%E7%BE%8E%E5%9B%BD","country_id":"US","region":"%E5%BC%97%E5%90%89%E5%B0%BC%E4%BA%9A","region_id":"US_VA","city":"%E9%98%BF%E4%BB%80%E6%9C%AC","city_id":"US_1103"}
Session
empty

Server/Request Data

USER
www
HOME
/home/www
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
HTTP_HOST
www.pethome.com.cn
PATH_INFO
/cjh/article/5938.html
REDIRECT_STATUS
200
SERVER_NAME
www.pethome.com.cn
SERVER_PORT
443
SERVER_ADDR
10.0.24.6
REMOTE_PORT
55912
REMOTE_ADDR
52.91.67.23
SERVER_SOFTWARE
nginx/1.20.2
GATEWAY_INTERFACE
CGI/1.1
HTTPS
on
REQUEST_SCHEME
https
SERVER_PROTOCOL
HTTP/2.0
DOCUMENT_ROOT
/www/wwwroot/www.pethome.com/public
DOCUMENT_URI
/index.php
REQUEST_URI
/cjh/article/5938.html
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/cjh/article/5938.html
SCRIPT_FILENAME
/www/wwwroot/www.pethome.com/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711664469.8847
REQUEST_TIME
1711664469
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/www.pethome.com/public/../application/
MAIN_SITE
https://www.pethome.com.cn
CLUB_SITE
https://talk.pethome.com.cn
THINK_VERSION
5.0.24
THINK_START_TIME
1711664469.8851
THINK_START_MEM
404736
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/www.pethome.com/thinkphp/
LIB_PATH
/www/wwwroot/www.pethome.com/thinkphp/library/
CORE_PATH
/www/wwwroot/www.pethome.com/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/www.pethome.com/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/www.pethome.com/
EXTEND_PATH
/www/wwwroot/www.pethome.com/extend/
VENDOR_PATH
/www/wwwroot/www.pethome.com/vendor/
RUNTIME_PATH
/www/wwwroot/www.pethome.com/runtime/
LOG_PATH
/www/wwwroot/www.pethome.com/runtime/log/
CACHE_PATH
/www/wwwroot/www.pethome.com/runtime/cache/
TEMP_PATH
/www/wwwroot/www.pethome.com/runtime/temp/
CONF_PATH
/www/wwwroot/www.pethome.com/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
FILTER_VALIDATE_BOOL
258
ADDON_PATH
/www/wwwroot/www.pethome.com/addons/