Skip to content

Commit

Permalink
Merge pull request #3 from dealnews/jearle_fix_flags_error
Browse files Browse the repository at this point in the history
Need to check to see flags exist before checking if it's an array.
  • Loading branch information
jearle-dealnews authored Mar 26, 2024
2 parents 8089dc2 + 2815d02 commit 23c1b84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public function fixOptions(array|int $options): array|int {
];
} elseif (is_array($filter) && $filter['filter'] === $this::FILTER_SANITIZE_STRING) {

if (is_array($filter['flags'])) {
if (!empty($filter['flags']) && is_array($filter['flags'])) {
$flags = 0;
foreach ($filter['flags'] as $flag) {
$flags = $flags | $flag;
Expand Down

0 comments on commit 23c1b84

Please sign in to comment.