Skip to content

Commit

Permalink
Merge pull request FriendsOfSymfony1#52 from moonraking/moonraking-pa…
Browse files Browse the repository at this point in the history
…tch-1

Check for null in fetchOne (php7.2)
  • Loading branch information
j0k3r authored Jun 25, 2018
2 parents e9f0245 + 2490c0a commit 92671a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Doctrine/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ public function fetchOne($params = array(), $hydrationMode = null)
return $collection;
}

if (count($collection) === 0) {
if ($collection === null || count($collection) === 0) {
return false;
}

Expand Down

0 comments on commit 92671a5

Please sign in to comment.