From 378a3d6e4dbb5618edb7f9b9e1f8fc811e7276ee Mon Sep 17 00:00:00 2001 From: Chuck Hagenbuch Date: Thu, 1 Oct 2009 20:42:43 -0400 Subject: [PATCH] Don't throw notices if the log event doesn't have a field that the filter has a constraint for. --- framework/Log/lib/Horde/Log/Filter/Constraint.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } } -- 2.11.0