From c80b23db9b8655b5d7e36a69fa048138e0984b79 Mon Sep 17 00:00:00 2001 From: Johannes Tyra Date: Tue, 5 Feb 2019 11:02:09 +0100 Subject: [PATCH] CHANGE: Changes / FIx in setLastElement // RecordDriver --- lib/Doctrine/Hydrator/RecordDriver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/Hydrator/RecordDriver.php b/lib/Doctrine/Hydrator/RecordDriver.php index b4944428b..bd60adf8f 100644 --- a/lib/Doctrine/Hydrator/RecordDriver.php +++ b/lib/Doctrine/Hydrator/RecordDriver.php @@ -106,7 +106,7 @@ public function setLastElement(&$prev, &$coll, $index, $dqlAlias, $oneToOne) return; } - if (count($coll) > 0) { + if (is_object($coll) && count($coll) > 0) { $prev[$dqlAlias] = $coll->getLast(); } }