|
@@ -47,7 +47,11 @@ class DebugHandler extends TestHandler implements DebugLoggerInterface
|
|
public function countErrors()
|
|
public function countErrors()
|
|
{
|
|
{
|
|
$cnt = 0;
|
|
$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])) {
|
|
if (isset($this->recordsByLevel[$level])) {
|
|
$cnt += count($this->recordsByLevel[$level]);
|
|
$cnt += count($this->recordsByLevel[$level]);
|
|
}
|
|
}
|