亚新体育app官网|官网欢迎您

[8] ErrorException in News.php line 76

Trying to get property 'id' of non-object

  1. $news= Article::order('sort desc,id desc')->where('lang',session('lang'))->field('id,article_cate_id,title')->select();
  2. $nextId = 0;
  3. $nextName = '';
  4. $previousId = 0;
  5. $previousName = '';
  6. $total = count($news);
  7. if($total != 1){
  8. foreach ($news as $k=>$v){
  9. if($v->id == $singleList->id){
  10. if($k == 0){
  11. $previousId = 0;
  12. $previousName = '无';
  13. $nextId = $news[$k+1]['id'];
  14. $nextName = $news[$k+1]['title'];
  15. }else if ($k == $total-1){
  16. $previousId = $news[$k-1]['id'];
  17. $previousName = $news[$k-1]['title'];
  18. $nextId = 0;

Call Stack

  1. in News.php line 76
  2. at Error::appError(8, 'Trying to get proper...', '/www/wwwroot/www.jsl...', 76, ['cate1' => [object(ArticleCate), object(ArticleCate), object(ArticleCate)], 'singleList' => null, 'belongCate' => null, ...]) in News.php line 76
  3. at News->newsDetails()
  4. at ReflectionMethod->invokeArgs(object(News), []) in App.php line 343
  5. at App::invokeMethod([object(News), 'newsDetails'], []) in App.php line 611
  6. at App::module(['zh', 'news', 'newsDetails'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 456
  7. at App::exec(['type' => 'module', 'module' => ['zh', 'news', 'newsDetails']], ['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.jsl...') in index.php line 17

Environment Variables

GET Data
empty
POST Data
empty
Files
empty

Cookies

PHPSESSID
n16pq23qbhgfdcv6q7cigh1tn4

Session

think
{ "lang": "zh" }

Server/Request Data

USER
www
HOME
/home/www
HTTP_COOKIE
PHPSESSID=n16pq23qbhgfdcv6q7cigh1tn4
HTTP_ACCEPT_ENCODING
gzip
HTTP_ACCEPT
*/*
HTTP_HOST
www.jslongjie.com
HTTP_USER_AGENT
Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
PATH_INFO
/zh/news/newsDetails/id/www.foxforum.net
REDIRECT_STATUS
200
SERVER_NAME
www.jslongjie.com
SERVER_PORT
80
SERVER_ADDR
172.17.4.4
REMOTE_PORT
32842
REMOTE_ADDR
216.172.156.50
SERVER_SOFTWARE
nginx/1.16.1
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/www/wwwroot/www.jslongjie.com/public
DOCUMENT_URI
/index.php
REQUEST_URI
/zh/news/newsDetails/id/www.foxforum.net
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/zh/news/newsDetails/id/www.foxforum.net
SCRIPT_FILENAME
/www/wwwroot/www.jslongjie.com/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1622493594.5485
REQUEST_TIME
1622493594
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/www.jslongjie.com/public/../application/
THINK_VERSION
5.0.23
THINK_START_TIME
1622493594.5489
THINK_START_MEM
405312
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/www.jslongjie.com/thinkphp/
LIB_PATH
/www/wwwroot/www.jslongjie.com/thinkphp/library/
CORE_PATH
/www/wwwroot/www.jslongjie.com/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/www.jslongjie.com/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/www.jslongjie.com/
EXTEND_PATH
/www/wwwroot/www.jslongjie.com/extend/
VENDOR_PATH
/www/wwwroot/www.jslongjie.com/vendor/
RUNTIME_PATH
/www/wwwroot/www.jslongjie.com/runtime/
LOG_PATH
/www/wwwroot/www.jslongjie.com/runtime/log/
CACHE_PATH
/www/wwwroot/www.jslongjie.com/runtime/cache/
TEMP_PATH
/www/wwwroot/www.jslongjie.com/runtime/temp/
CONF_PATH
/www/wwwroot/www.jslongjie.com/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
Baidu
sogou