Skip to content

Commit 1c49c8f

Browse files
committed
Mitigate 4.1 BC issue.
1 parent 98fc767 commit 1c49c8f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Model/Behavior/BitmaskedBehavior.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use ArrayObject;
66
use Cake\Database\Expression\Comparison;
7+
use Cake\Database\Expression\ComparisonExpression;
78
use Cake\Datasource\EntityInterface;
89
use Cake\Event\EventInterface;
910
use Cake\ORM\Behavior;
@@ -248,7 +249,7 @@ public function encodeBitmaskConditions(Query $query) {
248249
}
249250

250251
$callable = function ($comparison) use ($field, $mappedField) {
251-
if (!$comparison instanceof Comparison) {
252+
if (!$comparison instanceof Comparison && !$comparison instanceof ComparisonExpression) {
252253
return $comparison;
253254
}
254255
$key = $comparison->getField();

0 commit comments

Comments
 (0)