Fix logging filter "Error" when not entries (#5267)

This commit is contained in:
Yuriy Bakhtin 2021-08-31 16:36:11 +03:00 committed by GitHub
parent ed128ae634
commit 7a0f6c1ee1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -4,8 +4,7 @@ HumHub Changelog
1.9.2 (Unreleased)
------------------
- Fix #5265: Fix logging filter "Error" when not entries
1.9.1 (August 30, 2021)

View File

@ -241,6 +241,13 @@ class LogFilterForm extends Model
$result[$level] = static::getLevelLabel($level);
}
if (is_array($this->levels)) {
foreach ($this->levels as $defaultLevel) {
if (!isset($result[$defaultLevel]) && ($defaultLevelTitle = static::getLevelLabel($defaultLevel))) {
$result[$defaultLevel] = $defaultLevelTitle;
}
}
}
return $result;
}