mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-04 20:27:31 +02:00
Php5.3 autoload errors (#929)
* make ErrorHandler extends LogLevel to avoid autoloading issue when error is triggered on compile
* Revert "make ErrorHandler extends LogLevel to avoid autoloading issue when error is triggered on compile"
This reverts commit 8140f6026f
.
* call class_exists with force autoload set to true, to force the autoload of LogLevel on registration of the handlers
This commit is contained in:
committed by
Jordi Boggiano
parent
c82afaa303
commit
cc5f1eb34d
@@ -58,6 +58,9 @@ class ErrorHandler
|
||||
*/
|
||||
public static function register(LoggerInterface $logger, $errorLevelMap = array(), $exceptionLevel = null, $fatalLevel = null)
|
||||
{
|
||||
//Forces the autoloader to run for LogLevel. Fixes an autoload issue at compile-time on PHP5.3. See https://github.com/Seldaek/monolog/pull/929
|
||||
class_exists('\\Psr\\Log\\LogLevel', true);
|
||||
|
||||
$handler = new static($logger);
|
||||
if ($errorLevelMap !== false) {
|
||||
$handler->registerErrorHandler($errorLevelMap);
|
||||
|
Reference in New Issue
Block a user