Skip to content

Commit f1ea028

Browse files
authored
Merge pull request #2 from tobyS/patch-1
Fixed: Clone data objects that implement iterators
2 parents d460aa0 + 9de807f commit f1ea028

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Kore/DataObject/DataObject.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function __unset($name)
5858
*/
5959
public function __clone()
6060
{
61-
foreach ($this as $property => $value) {
61+
foreach (get_object_vars($this) as $property => $value) {
6262
if (is_object($value)) {
6363
$this->$property = clone $value;
6464
}

0 commit comments

Comments
 (0)