作者 邓超

x

@@ -39,8 +39,16 @@ class Home extends Base { @@ -39,8 +39,16 @@ class Home extends Base {
39 39
40 $where = ['email_id' => $this->getEmail('id')]; 40 $where = ['email_id' => $this->getEmail('id')];
41 41
  42 + foreach ($folder_ids as $k=>$folder_id){
  43 + if(!$folder_id){
  44 + unset($folder_ids[$k]);
  45 + }
  46 + }
  47 +
  48 + $folder_ids = array_values($folder_ids);
  49 +
42 // 默认查询 inbox 50 // 默认查询 inbox
43 - if(!is_array($folder_ids)){ 51 + if(!is_array($folder_ids) || !$folder_ids){
44 $folder_ids = db()->value( 52 $folder_ids = db()->value(
45 sprintf( 53 sprintf(
46 "select `id` from `%s` where `email_id` = %d and `origin_folder` = 'INBOX'", 54 "select `id` from `%s` where `email_id` = %d and `origin_folder` = 'INBOX'",
@@ -119,7 +119,7 @@ function my_filter($value,$filter=null){ @@ -119,7 +119,7 @@ function my_filter($value,$filter=null){
119 } 119 }
120 // 强制转类型 120 // 强制转类型
121 if(is_numeric($value)&&strlen($value)<10&&intval(substr($value,0,1))!==0){ 121 if(is_numeric($value)&&strlen($value)<10&&intval(substr($value,0,1))!==0){
122 - if(strpos($value,'.')!==false){ 122 + if(str_contains($value, '.')){
123 $value = floatval($value); 123 $value = floatval($value);
124 }else{ 124 }else{
125 $value = intval($value); 125 $value = intval($value);