Skip to content

Commit

Permalink
use exceptions instead of trigger_error #3
Browse files Browse the repository at this point in the history
  • Loading branch information
Josef Stich committed May 28, 2024
1 parent fa9efa0 commit 8b2b648
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Controller/Component/FilterComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function initialize(Controller $controller): void
if (!isset($controller->{$model})) {
$errMsg = __('Filter model not found: %s', $model);
if (is_string($errMsg)) {
trigger_error($errMsg);
throw new InvalidArgumentException($errMsg);
}
continue;
}
Expand Down Expand Up @@ -130,7 +130,7 @@ public function startup(Controller $controller)
if (!isset($controller->{$model})) {
$errMsg = __('Filter model not found: %s', $model);
if (is_string($errMsg)) {
trigger_error($errMsg);
throw new InvalidArgumentException($errMsg);
}
continue;
}
Expand Down

0 comments on commit 8b2b648

Please sign in to comment.