[8] ErrorException in Shop.php line 124

未定义数组索引: company_type

  1. $info = Db::name('store_company')->where(['id'=>$company_id])->field('id,name,cate_id,company_type,vid,logo,content,files')->find();
  2. $tmp = Db::name('store_company_cate')->where('id','in',$info['cate_id'])->field('title')->select();
  3. $info['cate_id'] = implode(',', array_column($tmp,'title'));
  4. $c = Db::name('store_collection')->where(['userid'=>$userid,'goodsid'=>$company_id,'type'=>3])->find();
  5. if($c){
  6. $info['is_collection'] = 1;
  7. }else{
  8. $info['is_collection'] = 2;
  9. }
  10. if($info['company_type'] == 1){
  11. $hot_list = Db::name('store_supply')->where(['vid'=>$info['vid'],'is_deleted'=>0,'status'=>1,'is_hot'=>1])->limit(8)->field('id,imgs,title,price,vid,thumb_display')->select();
  12. $new_list = Db::name('store_supply')->where(['vid'=>$info['vid'],'is_deleted'=>0,'status'=>1])->limit(8)->order('id desc')->field('id,imgs,title,price,vid,thumb_display')->select();
  13. foreach ($hot_list as &$v) {
  14. $v['is_tp'] = 0;
  15. }
  16. foreach ($new_list as &$val) {
  17. $val['is_tp'] = 0;
  18. }
  19. }else{

Call Stack

  1. in Shop.php line 124
  2. at Error::appError(8, 'Undefined index: com...', '/data/wwwroot/cnfzfl...', 124, ['userid' => null, 'company_id' => null, 'info' => ['cate_id' => '', 'is_collection' => 2], ...]) in Shop.php line 124
  3. at Shop->info()
  4. at ReflectionMethod->invokeArgs(object(Shop), []) in Container.php line 395
  5. at Container->invokeReflectMethod(object(Shop), object(ReflectionMethod), []) in Module.php line 132
  6. at Module->think\route\dispatch\{closure}(object(Request), object(Closure), null)
  7. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  8. at Middleware->think\{closure}(object(Request))
  9. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  10. at Middleware->dispatch(object(Request), 'controller') in Module.php line 137
  11. at Module->exec() in Dispatch.php line 168
  12. at Dispatch->run() in App.php line 432
  13. at App->think\{closure}(object(Request), object(Closure), null)
  14. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  15. at Middleware->think\{closure}(object(Request)) in sys.php line 116
  16. at {closure}(object(Request), object(Closure), null)
  17. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  18. at Middleware->think\{closure}(object(Request)) in common.php line 220
  19. at {closure}(object(Request), object(Closure), null)
  20. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  21. at Middleware->think\{closure}(object(Request))
  22. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  23. at Middleware->dispatch(object(Request)) in App.php line 435
  24. at App->run() in index.php line 22

Environment Variables

GET Data
id 13725
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
TEMP /tmp
TMPDIR /tmp
TMP /tmp
PATH /usr/local/bin:/usr/bin:/bin
USER www
HOME /home/www
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
HTTP_HOST www.cnfzflw.com
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME www.cnfzflw.com
SERVER_PORT 443
SERVER_ADDR 172.26.195.76
REMOTE_PORT 51688
REMOTE_ADDR 44.200.40.97
SERVER_SOFTWARE nginx/1.18.0
GATEWAY_INTERFACE CGI/1.1
HTTPS on
REQUEST_SCHEME https
SERVER_PROTOCOL HTTP/2.0
DOCUMENT_ROOT /data/wwwroot/cnfzflw/public
DOCUMENT_URI /index.php
REQUEST_URI /index/shop/info.html?id=13725
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/index/shop/info.html&id=13725
SCRIPT_FILENAME /data/wwwroot/cnfzflw/public/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711661951.0634
REQUEST_TIME 1711661951
Environment Variablesempty
ThinkPHP Constants
QINIU_FUNCTIONS_VERSION 7.2.7