File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -28,14 +28,12 @@ protected function doClone(mixed $var): array
2828 $ objRefs = []; // Map of original object handles to their stub object counterpart
2929 $ objects = []; // Keep a ref to objects to ensure their handle cannot be reused while cloning
3030 $ resRefs = []; // Map of original resource handles to their stub object counterpart
31- $ values = []; // Map of stub objects' ids to original values
3231 $ maxItems = $ this ->maxItems ;
3332 $ maxString = $ this ->maxString ;
3433 $ minDepth = $ this ->minDepth ;
3534 $ currentDepth = 0 ; // Current tree depth
3635 $ currentDepthFinalIndex = 0 ; // Final $queue index for current tree depth
3736 $ minimumDepthReached = 0 === $ minDepth ; // Becomes true when minimum tree depth has been reached
38- $ cookie = (object ) []; // Unique object used to detect hard references
3937 $ a = null ; // Array cast for nested structures
4038 $ stub = null ; // Stub capturing the main properties of an original item value
4139 // or null if the original value is used directly
@@ -53,7 +51,7 @@ protected function doClone(mixed $var): array
5351 }
5452 }
5553
56- $ refs = $ vals = $ queue [$ i ];
54+ $ vals = $ queue [$ i ];
5755 foreach ($ vals as $ k => $ v ) {
5856 // $v is the original value or a stub object in case of hard references
5957
@@ -215,10 +213,6 @@ protected function doClone(mixed $var): array
215213 $ queue [$ i ] = $ vals ;
216214 }
217215
218- foreach ($ values as $ h => $ v ) {
219- $ hardRefs [$ h ] = $ v ;
220- }
221-
222216 return $ queue ;
223217 }
224218}
You can’t perform that action at this time.
0 commit comments