[8] ErrorException in Doc.php line 268

未定义数组下标: 3

  1. return $result;
  2. }
  3. //获取面包屑
  4. public function get_category_crumb($id)
  5. {
  6. $arr = M('category')->where(map_format(array('status'=>1),1))->order('sort')->column('title,pid,alias,model,list_row,picture,picture,icon,ext_url','id');
  7. $pid = isset($arr[$id]['pid'])?$arr[$id]['pid']:0;
  8. //$result[]=isset($arr[$id]);
  9. $result[]=$arr[$id];
  10. while($pid > 0){
  11. foreach($arr as $v){
  12. if($v['id'] == $pid){
  13. $result[] = $v;
  14. $pid = $v['pid'];
  15. }
  16. }
  17. }
  18. return array_reverse($result);

Call Stack

  1. in Doc.php line 268
  2. at Error::appError(8, 'Undefined offset: 3', '/data/user/htdocs/co...', 268, ['id' => 3, 'arr' => [['id' => 31, 'title' => '服务内容', 'pid' => 2, ...], ['id' => 9, 'title' => '...', 'pid' => 13, ...], ['id' => 10, 'title' => '香港银行开户', 'pid' => 13, ...], ...], 'pid' => 0]) in Doc.php line 268
  3. at Doc->get_category_crumb(3) in Article.php line 123
  4. at Article->detail(117) in Article.php line 22
  5. at Article->lists(1)
  6. at ReflectionMethod->invokeArgs(object(Article), [1]) in Container.php line 395
  7. at Container->invokeReflectMethod(object(Article), object(ReflectionMethod), ['auth_token' => 1, 'auth_lang' => 'cn', 'catid' => '3', ...]) in Module.php line 131
  8. at Module->think\route\dispatch\{closure}(object(Request), object(Closure), null)
  9. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  10. at Middleware->think\{closure}(object(Request))
  11. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  12. at Middleware->dispatch(object(Request), 'controller') in Module.php line 136
  13. at Module->exec() in Dispatch.php line 168
  14. at Dispatch->run() in App.php line 490
  15. at App->think\{closure}(object(Request), object(Closure), null)
  16. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  17. at Middleware->think\{closure}(object(Request))
  18. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  19. at Middleware->dispatch(object(Request)) in App.php line 493
  20. at App->run() in start.php line 18
  21. at require('/data/user/htdocs/co...') in index.php line 19

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER nobody
HOME /
HTTP_HOST cn1456.com
HTTP_REFERER http://cn1456.com/hk-company-business
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
REDIRECT_STATUS 200
SERVER_NAME cn1456.com
SERVER_PORT 443
SERVER_ADDR 10.29.181.252
REMOTE_PORT 45158
REMOTE_ADDR 3.237.51.235
SERVER_SOFTWARE nginx/1.18.0
GATEWAY_INTERFACE CGI/1.1
HTTPS on
REQUEST_SCHEME https
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /data/user/htdocs
DOCUMENT_URI /index.php
REQUEST_URI /hk-company-business
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/hk-company-business
PATH_INFO
SCRIPT_FILENAME /data/user/htdocs/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711638796.1381
REQUEST_TIME 1711638796
Environment Variablesempty
ThinkPHP Constants
CONF_PATH /data/user/htdocs/conf/
APP_PATH /data/user/htdocs/app/
TMPL_PATH ./client/
THINK_VERSION 5.1.38
THINK_START_TIME 1711638796.1383
THINK_START_MEM 348072
EXT .php
DS /
THINK_PATH /data/user/htdocs/core/
__SELF__ /hk-company-business
_PHP_FILE_ /index.php
__ROOT__
HTTP_PREFIX https://
SITE_DOMAIN cn1456.com
SITE_URL https://cn1456.com
SITE_PATH /data/user/htdocs
BI_SYSTEM 企业应用系统
BI_AUTHOR BiXing SOFT
BI_SUPPORT QQ1977917927
BI_VERSION T 5.102
BI_ADDON_PATH ./Addons/
BI_PLUGIN_PATH ./plugins/
ADDON_ROOT ./addons/
ADDON_PATH /data/user/htdocs/addons/
NOW_TPL_IMG /themes/skin/default/static/images
NOW_TPL_CSS /themes/skin/default/static/css
NOW_TPL_JS /themes/skin/default/static/js
IS_AJAX false
IS_GET true
IS_POST false
IS_AJAX_POST false
NOW_TIME 1711638796
MODULE_NAME web
CONTROLLER_NAME Article
ACTION_NAME lists