正在显示
1 个修改的文件
包含
4 行增加
和
0 行删除
@@ -235,12 +235,16 @@ class App { | @@ -235,12 +235,16 @@ 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 | + if($value){ | ||
238 | $j = @json_decode($value,true); | 239 | $j = @json_decode($value,true); |
239 | if(is_array($j)){ | 240 | if(is_array($j)){ |
240 | $value = $j; | 241 | $value = $j; |
241 | }else{ | 242 | }else{ |
242 | $value = explode(',',(string) $value); | 243 | $value = explode(',',(string) $value); |
243 | } | 244 | } |
245 | + }else{ | ||
246 | + $value = []; | ||
247 | + } | ||
244 | } | 248 | } |
245 | foreach ($value as $k=>$v){ | 249 | foreach ($value as $k=>$v){ |
246 | if($v===''){ | 250 | if($v===''){ |
-
请 注册 或 登录 后发表评论