Skip to content

Commit 71ba62c

Browse files
authored
Merge pull request #61 from pavelzotikov/fix/null-check-previous-error-handler
Fix: Add null check for previous error handler
2 parents 654dc0a + a483ba9 commit 71ba62c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "PHP errors Catcher module for Hawk.so",
44
"keywords": ["hawk", "php", "error", "catcher"],
55
"type": "library",
6-
"version": "2.2.2",
6+
"version": "2.2.3",
77
"license": "MIT",
88
"require": {
99
"ext-curl": "*",

src/Handler.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,9 @@ public function handleError(int $level, string $message, string $file, int $line
203203
if ($event !== null) {
204204
$this->send($event);
205205

206-
return false !== ($this->previousErrorHandler)($level, $message, $file, $line);
206+
if (null !== $this->previousErrorHandler) {
207+
return false !== ($this->previousErrorHandler)($level, $message, $file, $line);
208+
}
207209
}
208210

209211
return false;

0 commit comments

Comments
 (0)