[8] ErrorException in Index.php line 98

Trying to get property 'fatherid' of non-object

  1. $tempData = model('Article')->alias('a')
  2. ->join('__AEFAULT_ARTICLE__ b', 'a.id = b.for_id')
  3. ->where('id', $id)
  4. ->where('state', 1)
  5. ->order('sort DESC,id DESC')
  6. ->find();
  7. // 上级分类
  8. $father = model('Article')->alias('a')
  9. ->join('__AEFAULT_ARTICLE__ b', 'a.id = b.for_id')
  10. ->where('id', $tempData->fatherid)
  11. ->where('state', 1)
  12. ->order('sort DESC,id DESC')
  13. ->find();
  14. // 查询条件
  15. $map = [
  16. 'type' => 2,
  17. 'fatherid' => $id,
  18. 'state' => 1
  19. ];

Call Stack

  1. in Index.php line 98
  2. at Error::appError(8, 'Trying to get proper...', '/www/wwwroot/dh_yidu...', 98, ['id' => '191', 'so' => null, 'tempData' => null]) in Index.php line 98
  3. at Index->info('191', null)
  4. at ReflectionMethod->invokeArgs(object(Index), ['191', null]) in App.php line 197
  5. at App::invokeMethod([object(Index), 'info'], []) in App.php line 411
  6. at App::module(['index', 'index', 'info'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 296
  7. at App::exec(['type' => 'module', 'module' => ['index', 'index', 'info']], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 124
  8. at App::run() in start.php line 18
  9. at require('/www/wwwroot/dh_yidu...') in index.php line 17

Exception Datas

Error Context
id
191
so
Resource
tempData
Resource

Environment Variables

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

Server/Request Data

USER
www
HOME
/home/www
HTTP_ACCEPT_ENCODING
deflate, gzip
HTTP_ACCEPT
*/*
HTTP_HOST
www.yndhjt.com
HTTP_USER_AGENT
Mozilla/5.0+(compatible;+Baiduspider/2.0;++http://www.baidu.com/search/spider.html)
PATH_INFO
/index_index_info_id_191.html
REDIRECT_STATUS
200
SERVER_NAME
www.yndhjt.com
SERVER_PORT
80
SERVER_ADDR
172.26.42.19
REMOTE_PORT
20001
REMOTE_ADDR
154.220.103.83
SERVER_SOFTWARE
nginx/1.14.1
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/www/wwwroot/dh_yiduqiang_com/public
DOCUMENT_URI
/index.php
REQUEST_URI
/index_index_info_id_191.html
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/index_index_info_id_191.html
SCRIPT_FILENAME
/www/wwwroot/dh_yiduqiang_com/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1594352974.685
REQUEST_TIME
1594352974
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/dh_yiduqiang_com/public/../application/
THINK_VERSION
5.0.11
THINK_START_TIME
1594352974.6857
THINK_START_MEM
403800
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/dh_yiduqiang_com/thinkphp/
LIB_PATH
/www/wwwroot/dh_yiduqiang_com/thinkphp/library/
CORE_PATH
/www/wwwroot/dh_yiduqiang_com/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/dh_yiduqiang_com/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/dh_yiduqiang_com/
EXTEND_PATH
/www/wwwroot/dh_yiduqiang_com/extend/
VENDOR_PATH
/www/wwwroot/dh_yiduqiang_com/vendor/
RUNTIME_PATH
/www/wwwroot/dh_yiduqiang_com/runtime/
LOG_PATH
/www/wwwroot/dh_yiduqiang_com/runtime/log/
CACHE_PATH
/www/wwwroot/dh_yiduqiang_com/runtime/cache/
TEMP_PATH
/www/wwwroot/dh_yiduqiang_com/runtime/temp/
CONF_PATH
/www/wwwroot/dh_yiduqiang_com/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false