File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
src/Symfony/Component/VarDumper/Cloner Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ protected function doClone($var)
33
33
$ indexedArrays = []; // Map of queue indexes that hold numerically indexed arrays
34
34
$ hardRefs = []; // Map of original zval hashes to stub objects
35
35
$ objRefs = []; // Map of original object handles to their stub object counterpart
36
+ $ objects = []; // Keep a ref to objects to ensure their handle cannot be reused while cloning
36
37
$ resRefs = []; // Map of original resource handles to their stub object counterpart
37
38
$ values = []; // Map of stub objects' hashes to original values
38
39
$ maxItems = $ this ->maxItems ;
@@ -200,6 +201,7 @@ protected function doClone($var)
200
201
}
201
202
if (empty ($ objRefs [$ h ])) {
202
203
$ objRefs [$ h ] = $ stub ;
204
+ $ objects [] = $ v ;
203
205
} else {
204
206
$ stub = $ objRefs [$ h ];
205
207
++$ stub ->refCount ;
You can’t perform that action at this time.
0 commit comments