Skip to content

Commit

Permalink
Fix some issue with 0 values and sorting of the args
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Janssen authored and fesor committed Jan 27, 2018
1 parent 6718d89 commit f7c4643
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ protected function gatherRowData(array $data, array &$id, array &$nonemptyCompon
foreach ($rowData['newObjects'] as $objIndex => $newObject) {
$class = $newObject['class'];
$args = $newObject['args'];
ksort($args);
$obj = $class->newInstanceArgs($args);

$rowData['newObjects'][$objIndex]['obj'] = $obj;
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/ORM/Query/SqlWalker.php
Original file line number Diff line number Diff line change
Expand Up @@ -1648,7 +1648,7 @@ public function walkNewObject($newObjectExpression, $newObjectResultAlias = null
'argIndex' => $argIndex,
];

if ($objOwner) {
if ($objOwner !== null) {
$this->rsm->addNewObjectAsArgument($objIndex, $objOwner, $objOwnerIdx);
}
}
Expand Down

0 comments on commit f7c4643

Please sign in to comment.