mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-04 20:27:31 +02:00
Fix error_handler return type declaration
This commit is contained in:
@@ -200,6 +200,8 @@ class ErrorHandler
|
|||||||
} elseif ($this->previousErrorHandler) {
|
} elseif ($this->previousErrorHandler) {
|
||||||
return call_user_func($this->previousErrorHandler, $code, $message, $file, $line, $context);
|
return call_user_func($this->previousErrorHandler, $code, $message, $file, $line, $context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -134,9 +134,11 @@ class StreamHandler extends AbstractProcessingHandler
|
|||||||
fwrite($stream, (string) $record['formatted']);
|
fwrite($stream, (string) $record['formatted']);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function customErrorHandler($code, $msg): void
|
private function customErrorHandler($code, $msg): bool
|
||||||
{
|
{
|
||||||
$this->errorMessage = preg_replace('{^(fopen|mkdir)\(.*?\): }', '', $msg);
|
$this->errorMessage = preg_replace('{^(fopen|mkdir)\(.*?\): }', '', $msg);
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getDirFromStream(string $stream): ?string
|
private function getDirFromStream(string $stream): ?string
|
||||||
|
@@ -182,6 +182,8 @@ class NormalizerFormatterTest extends \PHPUnit\Framework\TestCase
|
|||||||
restore_error_handler();
|
restore_error_handler();
|
||||||
$that->fail("$message should not be raised");
|
$that->fail("$message should not be raised");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
$formatter = new NormalizerFormatter();
|
$formatter = new NormalizerFormatter();
|
||||||
@@ -215,6 +217,8 @@ class NormalizerFormatterTest extends \PHPUnit\Framework\TestCase
|
|||||||
restore_error_handler();
|
restore_error_handler();
|
||||||
$that->fail("$message should not be raised");
|
$that->fail("$message should not be raised");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
$formatter = new NormalizerFormatter();
|
$formatter = new NormalizerFormatter();
|
||||||
|
@@ -34,6 +34,8 @@ class RotatingFileHandlerTest extends TestCase
|
|||||||
'code' => $code,
|
'code' => $code,
|
||||||
'message' => $message,
|
'message' => $message,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
return true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user