We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0bc67c7 commit 295be55Copy full SHA for 295be55
scripts/auto-prepend/bounce.php
@@ -13,16 +13,12 @@
13
use CrowdSecBouncer\StandaloneBouncer;
14
15
// If there is any technical problem while bouncing, don't block the user.
16
-set_error_handler(function ($errno, $errstr) {
17
- throw new BouncerException("$errstr (Error level: $errno)");
18
-});
19
try {
20
$bouncer = new StandaloneBouncer($crowdSecStandaloneBouncerConfig);
21
$bouncer->run();
22
} catch (\Throwable $e) {
23
$displayErrors = $crowdSecStandaloneBouncerConfig['display_errors'] ?? false;
24
if (true === $displayErrors) {
25
- throw $e;
+ throw new BouncerException($e->getMessage(), $e->getCode(), $e);
26
}
27
-}
28
-restore_error_handler();
+}
0 commit comments