Skip to content

Commit 2085f71

Browse files
committed
IN operators now require an array
1 parent c5fbaa9 commit 2085f71

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/PHPFUI/ORM/Operator/In.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ public function __construct()
1111

1212
public function correctlyTyped(mixed $variable) : bool
1313
{
14-
return \is_array($variable) || $variable instanceof \PHPFUI\ORM\Table;
14+
return (\is_array($variable) && count($variable)) || $variable instanceof \PHPFUI\ORM\Table;
1515
}
1616
}

src/PHPFUI/ORM/Operator/NotIn.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ public function __construct()
1111

1212
public function correctlyTyped(mixed $variable) : bool
1313
{
14-
return \is_array($variable) || $variable instanceof \PHPFUI\ORM\Table;
14+
return (\is_array($variable) && count($variable)) || $variable instanceof \PHPFUI\ORM\Table;
1515
}
1616
}

0 commit comments

Comments
 (0)