Security update for Core, with self-updated composer
[yaffs-website] / vendor / symfony / var-dumper / Caster / StubCaster.php
index 45e0022d1f455bddcd9066b6644fb26764e93667..2ec096c5a8c8825e493d69a45b16c4bc8e09dd99 100644 (file)
@@ -28,6 +28,12 @@ class StubCaster
             $stub->value = $c->value;
             $stub->handle = $c->handle;
             $stub->cut = $c->cut;
+            $stub->attr = $c->attr;
+
+            if (Stub::TYPE_REF === $c->type && !$c->class && is_string($c->value) && !preg_match('//u', $c->value)) {
+                $stub->type = Stub::TYPE_STRING;
+                $stub->class = Stub::STRING_BINARY;
+            }
 
             $a = array();
         }
@@ -54,9 +60,11 @@ class StubCaster
     public static function castEnum(EnumStub $c, array $a, Stub $stub, $isNested)
     {
         if ($isNested) {
-            $stub->class = '';
+            $stub->class = $c->dumpKeys ? '' : null;
             $stub->handle = 0;
             $stub->value = null;
+            $stub->cut = $c->cut;
+            $stub->attr = $c->attr;
 
             $a = array();