Skip to content

Commit

Permalink
Merge pull request zendframework#1609 from EvanDotPro/hotfix/skip-hyd…
Browse files Browse the repository at this point in the history
…ration-if-no-result

Skip DB row object hydration if ResultSet is empty
  • Loading branch information
ralphschindler committed Jun 26, 2012
2 parents 5f25a4c + 1f9f598 commit 08bdc99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/Zend/Db/ResultSet/HydratingResultSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function current()
{
$data = $this->dataSource->current();
$object = clone $this->objectPrototype;
return $this->hydrator->hydrate($data, $object);
return is_array($data) ? $this->hydrator->hydrate($data, $object) : false;
}

}

0 comments on commit 08bdc99

Please sign in to comment.