From f02bcd8fa9556680392198e15a03a58cf588eb19 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Thu, 7 Oct 2010 10:19:34 -0400 Subject: [PATCH] fix reading/saving flags when editing/creating a new rule --- ingo/rule.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ingo/rule.php b/ingo/rule.php index 5d7f95f15..5c3d34b28 100644 --- a/ingo/rule.php +++ b/ingo/rule.php @@ -113,11 +113,9 @@ case 'rule_delete': $rule['stop'] = $vars->stop; $rule['flags'] = 0; - $flags = $vars->flags || array(); - if (!empty($flags)) { - foreach ($flags as $val) { - $rule['flags'] |= $val; - } + $flags = empty($vars->flags) ? array() : $vars->flags; + foreach ($flags as $val) { + $rule['flags'] |= $val; } /* Update the timestamp for the rules. */ -- 2.11.0