Skip to content

Commit

Permalink
Merge pull request #61 from pavelzotikov/fix/null-check-previous-erro…
Browse files Browse the repository at this point in the history
…r-handler

Fix: Add null check for previous error handler
  • Loading branch information
neSpecc authored Oct 8, 2024
2 parents 654dc0a + a483ba9 commit 71ba62c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "PHP errors Catcher module for Hawk.so",
"keywords": ["hawk", "php", "error", "catcher"],
"type": "library",
"version": "2.2.2",
"version": "2.2.3",
"license": "MIT",
"require": {
"ext-curl": "*",
Expand Down
4 changes: 3 additions & 1 deletion src/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,9 @@ public function handleError(int $level, string $message, string $file, int $line
if ($event !== null) {
$this->send($event);

return false !== ($this->previousErrorHandler)($level, $message, $file, $line);
if (null !== $this->previousErrorHandler) {
return false !== ($this->previousErrorHandler)($level, $message, $file, $line);
}
}

return false;
Expand Down

0 comments on commit 71ba62c

Please sign in to comment.