diff --git a/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php b/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php index 9addc1d3c..1dfbfc441 100644 --- a/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php +++ b/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php @@ -546,7 +546,7 @@ class ObjectHydrator extends AbstractHydrator } - $scalarCount = count($rowData['scalars']); + $scalarCount = (isset($rowData['scalars'])? count($rowData['scalars']): 0); foreach ($rowData['newObjects'] as $objIndex => $newObject) { $class = $newObject['class'];