Skip to content

Commit 8f07647

Browse files
fix(error handler): Use ErrorException as BouncerException has not enough argument
1 parent 4c4f379 commit 8f07647

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/StandAloneBounce.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace CrowdSecBouncer;
44

5+
use ErrorException;
56
use Symfony\Component\Cache\Adapter\AbstractAdapter;
67
use Symfony\Component\Cache\Adapter\MemcachedAdapter;
78
use Symfony\Component\Cache\Adapter\PhpFilesAdapter;
@@ -356,7 +357,7 @@ public function safelyBounce(): void
356357
// If there is any technical problem while bouncing, don't block the user. Bypass boucing and log the error.
357358
try {
358359
set_error_handler(function ($errno, $errstr, $errfile, $errline) {
359-
throw new BouncerException($errstr, $errno, 0, $errfile, $errline);
360+
throw new ErrorException($errstr, $errno, 0, $errfile, $errline);
360361
});
361362
$this->run();
362363
restore_error_handler();

0 commit comments

Comments
 (0)