[8] ErrorException in Team.php line 36

未定义数组索引: catid

  1. $this->assign("list",$list);
  2. return $this->fetch();
  3. }
  4. public function detail(){
  5. // $this->assign('list',$list);
  6. $id = $this->postData['id'];
  7. $info = model('Content')->where('id',$id)->find();
  8. $info['catname'] = model('Category')->where('id',$info['catid'])->value('title');
  9. $info['url'] = model('Category')->where('id',$info['catid'])->value('url');
  10. $this->assign("info",$info);
  11. return $this->fetch();
  12. }
  13. }

Call Stack

  1. in Team.php line 36
  2. at Error::appError(8, 'Undefined index: cat...', '/www/wwwroot/zhongzi...', 36, ['id' => '68', 'info' => ['catname' => null]]) in Team.php line 36
  3. at Team->detail()
  4. at ReflectionMethod->invokeArgs(object(Team), []) in App.php line 224
  5. at App::invokeMethod([object(Team), 'detail'], []) in App.php line 392
  6. at App::module(['index', 'team', 'detail'], ['app_namespace' => 'app', 'app_debug' => true, 'app_trace' => false, ...], null) in App.php line 130
  7. at App::run() in start.php line 18
  8. at require('/www/wwwroot/zhongzi...') in index.php line 28

Exception Datas

Error Context
id 68
info { "catname": null }

Environment Variables

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

Server/Request Data

USER
www
HOME
/home/www
FCGI_ROLE
RESPONDER
SCRIPT_FILENAME
/www/wwwroot/zhongzi/index.php
QUERY_STRING
s=/index/team/detail/id/68.html
REQUEST_METHOD
GET
CONTENT_TYPE
CONTENT_LENGTH
SCRIPT_NAME
/index.php
REQUEST_URI
/index/team/detail/id/68.html
DOCUMENT_URI
/index.php
DOCUMENT_ROOT
/www/wwwroot/zhongzi
SERVER_PROTOCOL
HTTP/1.1
REQUEST_SCHEME
http
GATEWAY_INTERFACE
CGI/1.1
SERVER_SOFTWARE
nginx/1.18.0
REMOTE_ADDR
44.192.132.66
REMOTE_PORT
58478
SERVER_ADDR
172.17.9.125
SERVER_PORT
80
SERVER_NAME
zhongzilawyer.com
REDIRECT_STATUS
200
PATH_INFO
/index/team/detail/id/68.html
HTTP_ACCEPT
*/*
HTTP_USER_AGENT
claudebot
HTTP_HOST
zhongzilawyer.com
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711679815.3902
REQUEST_TIME
1711679815
Environment Variables
empty

ThinkPHP Constants

ROOT_PATH
/www/wwwroot/zhongzi/
APP_PATH
/www/wwwroot/zhongzi/application/
VENDOR_PATH
/www/wwwroot/zhongzi/vendor/
SYS_TIME
1711679815
EXTEND_PATH
./extend/
CHARSET
UTF-8
APP_URL
http://zhongzilawyer.com
THINK_VERSION
5.0.7
THINK_START_TIME
1711679815.3925
THINK_START_MEM
261848
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/zhongzi/thinkphp/
LIB_PATH
/www/wwwroot/zhongzi/thinkphp/library/
CORE_PATH
/www/wwwroot/zhongzi/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/zhongzi/thinkphp/library/traits/
RUNTIME_PATH
/www/wwwroot/zhongzi/runtime/
LOG_PATH
/www/wwwroot/zhongzi/runtime/log/
CACHE_PATH
/www/wwwroot/zhongzi/runtime/cache/
TEMP_PATH
/www/wwwroot/zhongzi/runtime/temp/
CONF_PATH
/www/wwwroot/zhongzi/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
ADDON_PATH
/www/wwwroot/zhongzi/addons/
DEVICE
mobile