Skip to content

Commit b03c26b

Browse files
committed
Fix setCriteria when equals null
Temp fix waiting PR parse-community/parse-php-sdk#406 approval
1 parent c5f7774 commit b03c26b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

QueryBuilder.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,10 @@ public function setCriteria(array $criteria)
156156
foreach ($criteria as $key => $value) {
157157
if (is_object($value) && $this->_om->getUnitOfWork()->isInIdentityMap($value)) {
158158
$this->field($key)->references($value);
159-
} else {
159+
} elseif (null === $value) {
160+
$this->field($key)->in([null]); // Temp fix as Parse PHP SDK convert equalTo null as exists=false
161+
}
162+
else {
160163
$this->field($key)->equals($value);
161164
}
162165
}

0 commit comments

Comments
 (0)