From: Bryan Davis Date: Fri, 12 Dec 2014 20:29:35 +0000 (-0700) Subject: Do not require that a Monolog handler has a formatter X-Git-Tag: 1.31.0-rc.0~12978^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/gestion/rappel_supprimer.php?a=commitdiff_plain;h=45cf5b1803b339d403f5ee9e983077bfc6a1606c;p=lhc%2Fweb%2Fwiklou.git Do not require that a Monolog handler has a formatter Not all handlers require a formatter. Change-Id: Ifb31aa278d4e90b7fa3a2b7bf3b20173b8345afd --- diff --git a/includes/debug/logger/monolog/Spi.php b/includes/debug/logger/monolog/Spi.php index c43e3d6bc3..4ad568763c 100644 --- a/includes/debug/logger/monolog/Spi.php +++ b/includes/debug/logger/monolog/Spi.php @@ -218,7 +218,11 @@ class MWLoggerMonologSpi implements MWLoggerSpi { if ( !isset( $this->singletons['handlers'][$name] ) ) { $spec = $this->config['handlers'][$name]; $handler = ObjectFactory::getObjectFromSpec( $spec ); - $handler->setFormatter( $this->getFormatter( $spec['formatter'] ) ); + if ( isset( $spec['formatter'] ) ) { + $handler->setFormatter( + $this->getFormatter( $spec['formatter'] ) + ); + } $this->singletons['handlers'][$name] = $handler; } return $this->singletons['handlers'][$name];