@@ -13,8 +13,8 @@ |
||
| 13 | 13 | { |
| 14 | 14 | $url = preg_replace("/^" . str_replace("/", "\/", Application::getAppConfig()->base_url) . "\//", "", $this->request->url); |
| 15 | 15 | |
| 16 | - if(!in_array($url, $middlewareParams["allow"])){ |
|
| 17 | - if($this->check_request($middlewareParams)){ |
|
| 16 | + if(!in_array($url, $middlewareParams["allow"])) { |
|
| 17 | + if($this->check_request($middlewareParams)) { |
|
| 18 | 18 | return new RedirectResponse($middlewareParams["redirect"], htmx: false, parse: false); |
| 19 | 19 | } |
| 20 | 20 | } |
@@ -14,7 +14,9 @@ |
||
| 14 | 14 | |
| 15 | 15 | public function validate($value) |
| 16 | 16 | { |
| 17 | - if (!is_a($value, $this->parent) && !is_int($value)) return false; |
|
| 17 | + if (!is_a($value, $this->parent) && !is_int($value)) { |
|
| 18 | + return false; |
|
| 19 | + } |
|
| 18 | 20 | return parent::validate($value); |
| 19 | 21 | } |
| 20 | 22 | } |