summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorfabriceparallel <fabrice@parallel.co.za>2017-03-12 18:42:12 +0200
committerJordi Boggiano <j.boggiano@seld.be>2017-03-12 17:42:12 +0100
commitcc5f1eb34df753600801f4619948daffc5c0df2c (patch)
tree7611b82b89c5dc56a5d84cd56f650165e5d090ed /src
parentc82afaa30356d20e08cc74fec7ab9b6ecd38288a (diff)
downloadmonolog-cc5f1eb34df753600801f4619948daffc5c0df2c.zip
monolog-cc5f1eb34df753600801f4619948daffc5c0df2c.tar.gz
monolog-cc5f1eb34df753600801f4619948daffc5c0df2c.tar.bz2
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 8140f6026f59a2be9f80e562cf6ad6d441241593. * call class_exists with force autoload set to true, to force the autoload of LogLevel on registration of the handlers
Diffstat (limited to 'src')
-rw-r--r--src/Monolog/ErrorHandler.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Monolog/ErrorHandler.php b/src/Monolog/ErrorHandler.php
index 0152298..7bfcd83 100644
--- a/src/Monolog/ErrorHandler.php
+++ b/src/Monolog/ErrorHandler.php
@@ -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);