← All changes
|
vendor/wpfluent/framework/src/WPFluent/Foundation/RequestGuard.php
+3
-1
2.8.1
→
2.11.0
View file →
| @@ -85,8 +85,10 @@ | ||
| 85 | 85 | throw $e; |
| 86 | 86 | } else { |
| 87 | 87 | App::make()->doCustomAction('handle_exception', $e); |
| 88 | 88 | } |
| 89 | + | |
| 90 | + return []; | |
| 89 | 91 | } |
| 90 | 92 | } |
| 91 | 93 | |
| 92 | 94 | /** |
| @@ -96,9 +98,9 @@ | ||
| 96 | 98 | */ |
| 97 | 99 | protected function shouldThrowException() |
| 98 | 100 | { |
| 99 | 101 | $isTrue = $this->isRest(); |
| 100 | - $isTrue = $isTrue || str_contains('test', App::make()->env()); | |
| 102 | + $isTrue = $isTrue || str_contains(App::make()->env(), 'test'); | |
| 101 | 103 | $isTrue = $isTrue || str_contains(strtolower(php_sapi_name()), 'cli'); |
| 102 | 104 | return $isTrue; |
| 103 | 105 | } |
| 104 | 106 | |