Skip to content

Commit abac889

Browse files
authored
Fixed a bug in removeFilteredPolicy.
1 parent 5fa40e0 commit abac889

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Adapter.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,10 @@ public function removeFilteredPolicy($sec, $ptype, $fieldIndex, ...$fieldValues)
108108
$condition[] = 'ptype = :ptype';
109109
foreach (range(0, 5) as $value) {
110110
if ($fieldIndex <= $value && $value < $fieldIndex + count($fieldValues)) {
111-
$where['v'.strval($value)] = $fieldValues[$value - $fieldIndex];
112-
$condition[] = 'v'.strval($value).' = :'.'v'.strval($value);
111+
if ('' != $fieldValues[$value - $fieldIndex]) {
112+
$where['v'.strval($value)] = $fieldValues[$value - $fieldIndex];
113+
$condition[] = 'v'.strval($value).' = :'.'v'.strval($value);
114+
}
113115
}
114116
}
115117

0 commit comments

Comments
 (0)