Helpers::handleErrors()
Performs an action with custom handling for all PHP errors and warnings
Helpers::handleErrors(Closure $action, Closure $condition, mixed $fallback = null): mixed
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| $action * | Closure |
– | Any action that may cause an error or warning |
| $condition * | Closure |
– | Closure that returns bool to determine if to suppress an error, receives arguments for set_error_handler() |
| $fallback | mixed |
null |
Value to return when error is suppressed |
Return type
mixed