8000 fixed issue #33751 · zcodes/symfony@57360b6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 57360b6

Browse files
author
zcodes
committed
fixed issue symfony#33751
1 parent fbf55c2 commit 57360b6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Symfony/Component/VarDumper/Caster/SymfonyCaster.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ public static function castRequest(Request $request, array $a, Stub $stub, $isNe
3333
$clone = null;
3434

3535
foreach (self::$requestGetters as $prop => $getter) {
36-
if (null === $a[Caster::PREFIX_PROTECTED.$prop]) {
36+
$key = Caster::PREFIX_PROTECTED.$prop;
37+
if (\array_key_exists($key, $a) && null === $a[$key]) {
3738
if (null === $clone) {
3839
$clone = clone $request;
3940
}
@@ -47,7 +48,9 @@ public static function castRequest(Request $request, array $a, Stub $stub, $isNe
4748
public static function castHttpClient($client, array $a, Stub $stub, $isNested)
4849
{
4950
$multiKey = sprintf("\0%s\0multi", \get_class($client));
50-
$a[$multiKey] = new CutStub($a[$multiKey]);
51+
if (\array_key_exists($multiKey, $a)) {
52+
$a[$multiKey] = new CutStub($a[$multiKey]);
53+
}
5154

5255
return $a;
5356
}

0 commit comments

Comments
 (0)
0