Skip to content

Commit

Permalink
Test for the getArrayCopy method in AbstractRestultSet
Browse files Browse the repository at this point in the history
If you're using the `ArraySerializable` hydrator, then you will have a
method called `getArrayCopy` in your row object, so allow
`AbstractResultSet` to use it.
  • Loading branch information
akrabat committed Sep 8, 2013
1 parent 71610d7 commit 360bbdc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/Zend/Db/ResultSet/AbstractResultSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ public function toArray()
$return[] = $row;
} elseif (method_exists($row, 'toArray')) {
$return[] = $row->toArray();
} elseif ($row instanceof ArrayObject) {
} elseif (method_exists($row, 'getArrayCopy')) {
$return[] = $row->getArrayCopy();
} else {
throw new Exception\RuntimeException(
Expand Down

0 comments on commit 360bbdc

Please sign in to comment.