From: Chuck Hagenbuch Date: Fri, 2 Oct 2009 00:42:43 +0000 (-0400) Subject: Don't throw notices if the log event doesn't have a field that the filter has a X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=378a3d6e4dbb5618edb7f9b9e1f8fc811e7276ee;p=horde.git Don't throw notices if the log event doesn't have a field that the filter has a constraint for. --- diff --git a/framework/Log/lib/Horde/Log/Filter/Constraint.php b/framework/Log/lib/Horde/Log/Filter/Constraint.php index 67d24b793..e5100defb 100644 --- a/framework/Log/lib/Horde/Log/Filter/Constraint.php +++ b/framework/Log/lib/Horde/Log/Filter/Constraint.php @@ -117,7 +117,8 @@ class Horde_Log_Filter_Constraint implements Horde_Log_Filter_Interface public function accept($event) { foreach ($this->_constraints as $field => $constraint) { - if (!$constraint->evaluate($event[$field])) { + $value = isset($event[$field]) ? $event[$field] : null; + if (!$constraint->evaluate($value)) { return false; } }