diff --git a/src/Symfony/Bridge/Monolog/Handler/DebugHandler.php b/src/Symfony/Bridge/Monolog/Handler/DebugHandler.php index e1c1f512b2..96b7fdd073 100644 --- a/src/Symfony/Bridge/Monolog/Handler/DebugHandler.php +++ b/src/Symfony/Bridge/Monolog/Handler/DebugHandler.php @@ -47,7 +47,11 @@ class DebugHandler extends TestHandler implements DebugLoggerInterface public function countErrors() { $cnt = 0; - foreach (array(Logger::ERROR, Logger::CRITICAL, Logger::ALERT) as $level) { + $levels = array(Logger::ERROR, Logger::CRITICAL, Logger::ALERT); + if (defined('Monolog\Logger::EMERGENCY')) { + $levels[] = Logger::EMERGENCY; + } + foreach ($levels as $level) { if (isset($this->recordsByLevel[$level])) { $cnt += count($this->recordsByLevel[$level]); }