作者 邓超

e

正在显示 1 个修改的文件 包含 8 行增加4 行删除
@@ -235,11 +235,15 @@ class App { @@ -235,11 +235,15 @@ class App {
235 public function requestArr($name='*',array $default = [], $filter = null){ 235 public function requestArr($name='*',array $default = [], $filter = null){
236 $value = $this->request($name,$default, $filter); 236 $value = $this->request($name,$default, $filter);
237 if(!is_array($value)){ 237 if(!is_array($value)){
238 - $j = @json_decode($value,true);  
239 - if(is_array($j)){  
240 - $value = $j; 238 + if($value){
  239 + $j = @json_decode($value,true);
  240 + if(is_array($j)){
  241 + $value = $j;
  242 + }else{
  243 + $value = explode(',',(string) $value);
  244 + }
241 }else{ 245 }else{
242 - $value = explode(',',(string) $value); 246 + $value = [];
243 } 247 }
244 } 248 }
245 foreach ($value as $k=>$v){ 249 foreach ($value as $k=>$v){