Skip to content

Commit

Permalink
Merge pull request #2 from tobyS/patch-1
Browse files Browse the repository at this point in the history
Fixed: Clone data objects that implement iterators
  • Loading branch information
kore authored Apr 7, 2019
2 parents d460aa0 + 9de807f commit f1ea028
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Kore/DataObject/DataObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function __unset($name)
*/
public function __clone()
{
foreach ($this as $property => $value) {
foreach (get_object_vars($this) as $property => $value) {
if (is_object($value)) {
$this->$property = clone $value;
}
Expand Down

0 comments on commit f1ea028

Please sign in to comment.