[8] ErrorException in Doc.php line 257

未定义数组下标: 152

  1. return $result;
  2. }
  3. //获取面包屑
  4. public function get_category_crumb($id)
  5. {
  6. $arr = M('category')->where(map_format(array('status'=>1)))->order('sort')->column('title,pid,alias,model,list_row,picture,picture,icon','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 257
  2. at Error::appError(8, 'Undefined offset: 15...', '/www/wwwroot/juyizhi...', 257, ['id' => 152, 'arr' => [['id' => 162, 'title' => '单拷(贝)', 'pid' => 127, ...], ['id' => 22, 'title' => '应用领域', 'pid' => 21, ...], ['id' => 113, 'title' => '联系我们', 'pid' => 30, ...], ...], 'pid' => 0]) in Doc.php line 257
  3. at Doc->get_category_crumb(152) in Article.php line 105
  4. at Article->detail('304')
  5. at ReflectionMethod->invokeArgs(object(Article), ['304']) in Container.php line 395
  6. at Container->invokeReflectMethod(object(Article), object(ReflectionMethod), ['id' => '304', 'convert' => false]) in Module.php line 131
  7. at Module->think\route\dispatch\{closure}(object(Request), object(Closure), null)
  8. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  9. at Middleware->think\{closure}(object(Request))
  10. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  11. at Middleware->dispatch(object(Request), 'controller') in Module.php line 136
  12. at Module->exec() in Dispatch.php line 168
  13. at Dispatch->run() in App.php line 460
  14. at App->think\{closure}(object(Request), object(Closure), null)
  15. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  16. at Middleware->think\{closure}(object(Request))
  17. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  18. at Middleware->dispatch(object(Request)) in App.php line 463
  19. at App->run() in start.php line 18
  20. at require('/www/wwwroot/juyizhi...') in index.php line 9

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
HTTP_HOST www.juyizhiye.com
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME juyizhiye.com
SERVER_PORT 443
SERVER_ADDR 172.26.82.0
REMOTE_PORT 47040
REMOTE_ADDR 34.230.35.103
SERVER_SOFTWARE nginx/1.18.0
GATEWAY_INTERFACE CGI/1.1
HTTPS on
REQUEST_SCHEME https
SERVER_PROTOCOL HTTP/2.0
DOCUMENT_ROOT /www/wwwroot/juyizhiye.com
DOCUMENT_URI /index.php
REQUEST_URI /show-304.html
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/show-304.html
SCRIPT_FILENAME /www/wwwroot/juyizhiye.com/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711664976.6487
REQUEST_TIME 1711664976
Environment Variablesempty
ThinkPHP Constants
CONF_PATH /www/wwwroot/juyizhiye.com/conf/
APP_PATH /www/wwwroot/juyizhiye.com/app/
TMPL_PATH ./client/
THINK_VERSION 5.1.38
THINK_START_TIME 1711664976.6489
THINK_START_MEM 377832
EXT .php
DS /
THINK_PATH /www/wwwroot/juyizhiye.com/core/
__SELF__ /show-304.html
_PHP_FILE_ /index.php
__ROOT__
HTTP_PREFIX https://
SITE_DOMAIN www.juyizhiye.com
SITE_URL https://www.juyizhiye.com
SITE_PATH /www/wwwroot/juyizhiye.com
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 /www/wwwroot/juyizhiye.com/addons/
NOW_TPL_IMG /themes/skin01/static/images
NOW_TPL_CSS /themes/skin01/static/css
NOW_TPL_JS /themes/skin01/static/js
IS_AJAX false
IS_GET true
IS_POST false
IS_AJAX_POST false
NOW_TIME 1711664976
MODULE_NAME web
CONTROLLER_NAME Article
ACTION_NAME detail