@@ -40,8 +40,7 @@ discard block |
||
| 40 | 40 | |
| 41 | 41 | if(isset($arr['status']) && $type==2){ |
| 42 | 42 | $ret=$arr; |
| 43 | - } |
|
| 44 | - else{ |
|
| 43 | + } else{ |
|
| 45 | 44 | $ret['status'] = $type; |
| 46 | 45 | $ret['data'] = $arr; |
| 47 | 46 | } |
@@ -156,7 +155,7 @@ discard block |
||
| 156 | 155 | // 重新生成id |
| 157 | 156 | session_regenerate_id(); |
| 158 | 157 | } |
| 159 | - }else { |
|
| 158 | + } else { |
|
| 160 | 159 | if (strpos($name, '.')) { |
| 161 | 160 | list($name1, $name2) = explode('.', $name); |
| 162 | 161 | return isset($_SESSION[$name1][$name2]) ? $_SESSION[$name1][$name2] : null; |
@@ -328,12 +327,11 @@ discard block |
||
| 328 | 327 | if ($filters) { |
| 329 | 328 | if (is_string($filters)) { |
| 330 | 329 | $filters = explode(',', $filters); |
| 331 | - } |
|
| 332 | - else if (is_array($filters)){ |
|
| 330 | + } else if (is_array($filters)){ |
|
| 333 | 331 | foreach ($filters as $filter) { |
| 334 | 332 | $data = array_map_recursive($filter, $data); // 参数过滤 |
| 335 | 333 | } |
| 336 | - }else{ |
|
| 334 | + } else{ |
|
| 337 | 335 | throw new \RuntimeException('$filters must be an array or string.'); |
| 338 | 336 | } |
| 339 | 337 | } |