作者 邓超

bug

@@ -27,14 +27,16 @@ class Home extends Base { @@ -27,14 +27,16 @@ class Home extends Base {
27 private function getFolderIds($email_id){ 27 private function getFolderIds($email_id){
28 $folder_ids = app()->request('folder_ids',[],['intval','abs']); 28 $folder_ids = app()->request('folder_ids',[],['intval','abs']);
29 29
30 - foreach ($folder_ids as $k=>$folder_id){  
31 - if(!$folder_id){  
32 - unset($folder_ids[$k]); 30 + if(is_array($folder_ids)){
  31 + foreach ($folder_ids as $k=>$folder_id){
  32 + if(!$folder_id){
  33 + unset($folder_ids[$k]);
  34 + }
33 } 35 }
34 - }  
35 36
36 - if($folder_ids){  
37 - $folder_ids = array_values($folder_ids); 37 + if($folder_ids){
  38 + $folder_ids = array_values($folder_ids);
  39 + }
38 } 40 }
39 41
40 // 默认查询 inbox 42 // 默认查询 inbox