Skip to content

Commit 8f69f2b

Browse files
Merge branch '4.3' into 4.4
* 4.3: [Cache] clean tags folder on invalidation [Cache] remove implicit dependency on symfony/filesystem Allow to set cookie_samesite to 'none' [VarDumper] fix array key error for class SymfonyCaster Adds missing translations for no nb [HttpKernel] fix $dotenvVars in data collector Add the missing translations for the Swedish ("sv") locale bumped Symfony version to 4.3.6 updated VERSION for 4.3.5 updated CHANGELOG for 4.3.5 bumped Symfony version to 3.4.33 updated VERSION for 3.4.32 update CONTRIBUTORS for 3.4.32 updated CHANGELOG for 3.4.32 [Messenger] DoctrineTransport: ensure auto setup is only done once [Form][DateTimeImmutableToDateTimeTransformer] Preserve microseconds and use \DateTime::createFromImmutable() when available [Crawler] document $default as string|null
2 parents 768b99d + f4c53ad commit 8f69f2b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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 (isset($a[$multiKey])) {
52+
$a[$multiKey] = new CutStub($a[$multiKey]);
53+
}
5154

5255
return $a;
5356
}

0 commit comments

Comments
 (0)