Skip to content

Commit

Permalink
Update: 优化错误捕获处理
Browse files Browse the repository at this point in the history
解决错误抑制运算符失效问题
  • Loading branch information
NHZEX authored Mar 20, 2024
1 parent b75f763 commit 3fd1f32
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Log/ErrorLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ public function register(): void
*/
public function onError(int $errno, string $errstr, string $errfile, int $errline): void
{
if (0 === (error_reporting() & $errno))
{
return;
}
foreach ($this->errorEventHandlers as $class)
{
$handler = new $class();
Expand Down

0 comments on commit 3fd1f32

Please sign in to comment.