[2] ErrorException in Index.php line 232

Creating default object from empty value

  1. $get = request()->route();
  2. $field = (new Article)->where($get)->find();
  3. $artTags = (new TagOptionModel)->field('tag_id')->where('post_id',$field['id'])->select()->toArray();
  4. $arr = array();
  5. foreach($artTags as $a){
  6. $arr[] = $a['tag_id'];
  7. }
  8. $tag_ids = implode(',', $arr);
  9. $tagAll = (new TagModel)->field('id,name')->where(['id' => ['in',$tag_ids]])->select()->toArray();
  10. $field->tagsAll = $tagAll;
  11. (new Article)->where('url',$get['url'])->update(array('view'=>$field['view']+1));
  12. $field_cate = (new Category)->where('id',$field['cate_id'])->find();
  13. //热门标签
  14. $randTags = (new TagModel)->order('view desc')->limit(50)->select();
  15. $this->assign('randTags',$randTags);
  16. //相关文章
  17. $likewhere['title'] = ['like','%'.mb_substr($field['title'],0,3).'%'];
  18. $randArt = (new Article)->where($likewhere)->order('view desc')->limit(5)->select()->toArray();
  19. $this->assign('randarr',$randArt);

Call Stack

  1. in Index.php line 232
  2. at Error::appError(2, 'Creating default obj...', '/www/wwwroot/www.yej...', 232, ['get' => ['url' => 'index'], 'field' => object(stdClass), 'artTags' => [], ...]) in Index.php line 232
  3. at Index->show()
  4. at ReflectionMethod->invokeArgs(object(Index), []) in App.php line 343
  5. at App::invokeMethod([object(Index), 'show'], []) in App.php line 611
  6. at App::module([null, 'index', 'show'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 456
  7. at App::exec(['type' => 'module', 'module' => [null, 'index', 'show'], 'convert' => false], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  8. at App::run() in start.php line 20
  9. at require('/www/wwwroot/www.yej...') in index.php line 63

Environment Variables

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

Server/Request Data

USER
www
HOME
/home/www
HTTP_HOST
www.yejiekeji.cn
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
PATH_INFO
//show/index.html
REDIRECT_STATUS
200
SERVER_NAME
www.yejiekeji.cn
SERVER_PORT
80
SERVER_ADDR
172.17.3.81
REMOTE_PORT
58960
REMOTE_ADDR
18.206.83.160
SERVER_SOFTWARE
nginx/1.16.1
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/www/wwwroot/www.yejiekeji.cn/www.yejie8.com/public
DOCUMENT_URI
/index.php
REQUEST_URI
/show/index.html
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=//show/index.html
SCRIPT_FILENAME
/www/wwwroot/www.yejiekeji.cn/www.yejie8.com/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711720974.8715
REQUEST_TIME
1711720974
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/www.yejiekeji.cn/www.yejie8.com/public/../application/
CONF_PATH
/www/wwwroot/www.yejiekeji.cn/www.yejie8.com/public/../config/
THINK_VERSION
5.0.24
THINK_START_TIME
1711720974.8793
THINK_START_MEM
422224
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/www.yejiekeji.cn/www.yejie8.com/thinkphp/
LIB_PATH
/www/wwwroot/www.yejiekeji.cn/www.yejie8.com/thinkphp/library/
CORE_PATH
/www/wwwroot/www.yejiekeji.cn/www.yejie8.com/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/www.yejiekeji.cn/www.yejie8.com/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/www.yejiekeji.cn/www.yejie8.com/
EXTEND_PATH
/www/wwwroot/www.yejiekeji.cn/www.yejie8.com/extend/
VENDOR_PATH
/www/wwwroot/www.yejiekeji.cn/www.yejie8.com/vendor/
RUNTIME_PATH
/www/wwwroot/www.yejiekeji.cn/www.yejie8.com/runtime/
LOG_PATH
/www/wwwroot/www.yejiekeji.cn/www.yejie8.com/runtime/log/
CACHE_PATH
/www/wwwroot/www.yejiekeji.cn/www.yejie8.com/runtime/cache/
TEMP_PATH
/www/wwwroot/www.yejiekeji.cn/www.yejie8.com/runtime/temp/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false