[8] ErrorException in Index.php line 151

Trying to get property 'user_id' of non-object

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

Call Stack

  1. in Index.php line 151
  2. at Error::appError(8, 'Trying to get proper...', '/www/wwwroot/www.pet...', 151, ['pid' => '927', 'sid' => '', 'preview' => '', ...]) in Index.php line 151
  3. at Index->picture()
  4. at ReflectionMethod->invokeArgs(object(Index), []) in App.php line 343
  5. at App::invokeMethod([object(Index), 'picture'], []) in App.php line 611
  6. at App::module(['pictures', 'index', 'picture'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 456
  7. at App::exec(['type' => 'module', 'module' => ['pictures', 'index', 'picture'], '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%8A%A0%E5%88%A9%E7%A6%8F%E5%B0%BC%E4%BA%9A","region_id":"US_CA","city":"%E5%9C%A3%E5%9C%B0%E4%BA%9A%E5%93%A5","city_id":"US_1039"}
Session
empty

Server/Request Data

USER
www
HOME
/home/www
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
HTTP_HOST
www.pethome.com.cn
PATH_INFO
/picture/927.html
REDIRECT_STATUS
200
SERVER_NAME
www.pethome.com.cn
SERVER_PORT
443
SERVER_ADDR
10.0.24.6
REMOTE_PORT
47490
REMOTE_ADDR
44.197.114.92
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
/picture/927.html
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/picture/927.html
SCRIPT_FILENAME
/www/wwwroot/www.pethome.com/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711658723.2923
REQUEST_TIME
1711658723
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
1711658723.2927
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/