Skip to content

Commit

Permalink
Fixed immutability of the "blueprint" entity used when cloning objects
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocramius committed Aug 14, 2014
1 parent 5fda717 commit c0302f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Doctrine/Instantiator/Instantiator.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function instantiate($className)

// not cloneable if it implements `__clone`, as we want to avoid calling it
if (! $reflection->hasMethod('__clone')) {
self::$cachedCloneables[$className] = $instance;
self::$cachedCloneables[$className] = clone $instance;
}

return $instance;
Expand Down

0 comments on commit c0302f3

Please sign in to comment.