[8] ErrorException in Content.php line 192

未定义数组索引: category_id

  1. foreach ($comment_list as $k => $v) {
  2. $comment_list[$k]['avator'] = '/public/images/default_avatar.jpg';
  3. $comment_list[$k]['username'] = '游客';
  4. $comment_list[$k]['ip'] = ip_show(long2ip($v['ip']));
  5. if (empty($v['reply'])) {
  6. $comment_list[$k]['reply'] = '暂无回复';
  7. }
  8. }
  9. $cate = $this->getCategory($info['category_id']);
  10. $left_nav = get_left_nav($info['category_id']);
  11. if (isMobile()) {
  12. $info['title'] = $info['mobile_title'] ? $info['mobile_title'] : $info['title'];
  13. $info['cover_id'] = $info['mobile_cover'] ? $info['mobile_cover'] : $info['cover_id'];
  14. $info['description'] = $info['mobile_description'] ? $info['mobile_description'] : $info['description'];
  15. $info['content'] = $info['mobile_content'] ? $info['mobile_content'] : $info['content'];
  16. }

Call Stack

  1. in Content.php line 192
  2. at Error::appError(8, 'Undefined index: cat...', '/www/wwwroot/www.xin...', 192, ['id' => '304', 'name' => '', 'info' => ['template_detail' => null], ...]) in Content.php line 192
  3. at Content->detail('304', '')
  4. at ReflectionMethod->invokeArgs(object(Content), ['304', '']) in App.php line 196
  5. at App::invokeMethod([object(Content), 'detail'], []) in App.php line 412
  6. at App::module(['index', 'content', 'detail'], ['app_debug' => '1', 'app_trace' => false, 'app_status' => '', ...], false) in App.php line 295
  7. at App::exec(['type' => 'module', 'module' => ['index', 'content', 'detail'], 'convert' => false], ['app_debug' => '1', 'app_trace' => false, 'app_status' => '', ...]) in App.php line 123
  8. at App::run() in start.php line 18
  9. at require('/www/wwwroot/www.xin...') in index.php line 34

Exception Datas

Error Context
id 304
name
info { "template_detail": null }
template_detail Resource
comment_list { "total": 0, "per_page": 10, "current_page": 1, "last_page": 0, "data": [] }

Environment Variables

GET Data
empty
POST Data
empty
Files
empty
Cookies
empty

Session

zzb
{ "set_content_view": 1710833698 }

Server/Request Data

USER
www
HOME
/home/www
HTTP_HOST
www.xingguochem.com
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
PATH_INFO
/article/detail-304.html
REDIRECT_STATUS
200
SERVER_NAME
www.xingguochem.com
SERVER_PORT
80
SERVER_ADDR
172.19.50.206
REMOTE_PORT
39948
REMOTE_ADDR
54.205.179.155
SERVER_SOFTWARE
nginx/1.22.1
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/www/wwwroot/www.xingguochem.com
DOCUMENT_URI
/index.php
REQUEST_URI
/article/detail-304.html
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/article/detail-304.html
SCRIPT_FILENAME
/www/wwwroot/www.xingguochem.com/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1710833698.2437
REQUEST_TIME
1710833698
Environment Variables
empty

ThinkPHP Constants

wwwroot
http://l.govedu.cc/?
request
/article/detail-304.html
referer
Resource
user_agent
claudebot
suffix
@\.(xml|doc|txt|ppt|xls|csv|shtml)@i
is_origin
road=www.xingguochem.com/article/detail-304.html
spider_head
@Baidu|Sogou|Yisou|Haosou|360Spi|So.com|Sm.cn@i
is_suffix
0
is_referer
0
is_user_agent
0
is_mobile
0
APP_PATH
/www/wwwroot/www.xingguochem.com/application/
BASE_PATH
ROOT_PATH
/www/wwwroot/www.xingguochem.com/
EXTEND_PATH
/www/wwwroot/www.xingguochem.com/core/extend/
VENDOR_PATH
/www/wwwroot/www.xingguochem.com/core/vendor/
ICONV_ENABLED
true
RUNTIME_PATH
/www/wwwroot/www.xingguochem.com/data/
THINK_VERSION
5.0.9
THINK_START_TIME
1710833698.2446
THINK_START_MEM
422704
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/www.xingguochem.com/core/
LIB_PATH
/www/wwwroot/www.xingguochem.com/core/library/
CORE_PATH
/www/wwwroot/www.xingguochem.com/core/library/think/
TRAIT_PATH
/www/wwwroot/www.xingguochem.com/core/library/traits/
LOG_PATH
/www/wwwroot/www.xingguochem.com/data/log/
CACHE_PATH
/www/wwwroot/www.xingguochem.com/data/cache/
TEMP_PATH
/www/wwwroot/www.xingguochem.com/data/temp/
CONF_PATH
/www/wwwroot/www.xingguochem.com/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
ZZBCMS_VERSION
1.0.20170501
ZZB_ADDON_PATH
/www/wwwroot/www.xingguochem.com//addons/
SCRIPT_NAME
/index.php
MODULE_NAME
index
CONTROLLER_NAME
Content
ACTION_NAME
detail
IS_POST
false
IS_GET
true