Skip to content

Commit

Permalink
Fixed a bug in removeFilteredPolicy.
Browse files Browse the repository at this point in the history
  • Loading branch information
leeqvip authored Apr 2, 2019
1 parent 291d324 commit 6f06165
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Adapters/DatabaseAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ public function removeFilteredPolicy($sec, $ptype, $fieldIndex, ...$fieldValues)
$instance = $this->eloquent->where('ptype', $ptype);
foreach (range(0, 5) as $value) {
if ($fieldIndex <= $value && $value < $fieldIndex + count($fieldValues)) {
$instance->where('v'.strval($value), $fieldValues[$value - $fieldIndex]);
if ('' != $fieldValues[$value - $fieldIndex]) {
$instance->where('v'.strval($value), $fieldValues[$value - $fieldIndex]);
}
}
}

Expand Down

0 comments on commit 6f06165

Please sign in to comment.