Skip to content

Commit 92671a5

Browse files
authored
Merge pull request #52 from moonraking/moonraking-patch-1
Check for null in fetchOne (php7.2)
2 parents e9f0245 + 2490c0a commit 92671a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Doctrine/Query.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ public function fetchOne($params = array(), $hydrationMode = null)
285285
return $collection;
286286
}
287287

288-
if (count($collection) === 0) {
288+
if ($collection === null || count($collection) === 0) {
289289
return false;
290290
}
291291

0 commit comments

Comments
 (0)