1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-21 08:36:33 +02:00

Restore filtering behavior, refs #663

This commit is contained in:
Jordi Boggiano
2015-10-14 14:12:50 +01:00
parent 0a2e4237d3
commit 80c4bfb9fd
2 changed files with 24 additions and 1 deletions

View File

@@ -53,7 +53,15 @@ class WebProcessor
}
if (null !== $extraFields) {
$this->extraFields = $extraFields;
if (isset($extraFields[0])) {
foreach (array_keys($this->extraFields) as $fieldName) {
if (!in_array($fieldName, $extraFields)) {
unset($this->extraFields[$fieldName]);
}
}
} else {
$this->extraFields = $extraFields;
}
}
}