diff vendor/symfony/var-dumper/Cloner/VarCloner.php @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents a9cd425dd02b
children
line wrap: on
line diff
--- a/vendor/symfony/var-dumper/Cloner/VarCloner.php	Thu Feb 28 13:11:55 2019 +0000
+++ b/vendor/symfony/var-dumper/Cloner/VarCloner.php	Thu May 09 15:34:47 2019 +0100
@@ -33,6 +33,7 @@
         $indexedArrays = [];       // Map of queue indexes that hold numerically indexed arrays
         $hardRefs = [];            // Map of original zval hashes to stub objects
         $objRefs = [];             // Map of original object handles to their stub object counterpart
+        $objects = [];             // Keep a ref to objects to ensure their handle cannot be reused while cloning
         $resRefs = [];             // Map of original resource handles to their stub object counterpart
         $values = [];              // Map of stub objects' hashes to original values
         $maxItems = $this->maxItems;
@@ -200,6 +201,7 @@
                         }
                         if (empty($objRefs[$h])) {
                             $objRefs[$h] = $stub;
+                            $objects[] = $v;
                         } else {
                             $stub = $objRefs[$h];
                             ++$stub->refCount;