Skip to content

Commit eb0112b

Browse files
committed
on HeroTrait
1 parent 9b5d013 commit eb0112b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/HeroTrait.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ public function phpError(...$args): void
5555
set_error_handler([$this, 'phpErrorHandler']);
5656
}
5757

58-
private static function isUncaught(array $error): bool
58+
private static function isUncaught(string $message): bool
5959
{
60-
return str_starts_with($error['message'], 'Uncaught');
60+
return str_starts_with($message, 'Uncaught');
6161
}
6262

6363
public function phpFatalErrorHandler(string $buffer): string
@@ -67,7 +67,7 @@ public function phpFatalErrorHandler(string $buffer): string
6767
return $buffer;
6868
}
6969

70-
return self::isUncaught($error) || $this->result === ''
70+
return self::isUncaught($error['message']) || $this->result === ''
7171
? $buffer
7272
: $this->result;
7373
}
@@ -79,7 +79,7 @@ public function execOnShutdown(): void
7979
return;
8080
}
8181

82-
if (self::isUncaught($error)) {
82+
if (self::isUncaught($error['message'])) {
8383
return;
8484
}
8585

0 commit comments

Comments
 (0)