We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 090c9cd commit 126eab1Copy full SHA for 126eab1
src/Doctrine/Instantiator/Instantiator.php
@@ -2,6 +2,7 @@
2
3
namespace Doctrine\Instantiator;
4
5
+use ArrayIterator;
6
use Doctrine\Instantiator\Exception\InvalidArgumentException;
7
use Doctrine\Instantiator\Exception\UnexpectedValueException;
8
use Exception;
@@ -195,6 +196,8 @@ private function hasInternalAncestors(ReflectionClass $reflectionClass) : bool
195
196
*/
197
private function isSafeToClone(ReflectionClass $reflection) : bool
198
{
- return $reflection->isCloneable() && ! $reflection->hasMethod('__clone');
199
+ return $reflection->isCloneable()
200
+ && ! $reflection->hasMethod('__clone')
201
+ && ! $reflection->isSubclassOf(ArrayIterator::class);
202
}
203
0 commit comments