Skip to content

Commit 90790c7

Browse files
Merge branch '4.4'
* 4.4: (26 commits) cs fix [Validator] sync NO and NB translations [Cache] improve perf of pruning for fs-based adapters [Cache] cs fix [Cache] clean tags folder on invalidation [Cache] remove implicit dependency on symfony/filesystem Allow to set cookie_samesite to 'none' [Dotenv] support setting default env var values [VarDumper] fix array key error for class SymfonyCaster [Cache] Improve RedisTagAwareAdapter invalidation logic & requirements Adds missing translations for no nb [HttpKernel] fix $dotenvVars in data collector Add the missing translations for the Swedish ("sv") locale Prevent ProgressBar redraw when message is same [DI] enable improved syntax for defining method calls in Yaml 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 ...
2 parents 06aedf0 + 8f69f2b commit 90790c7

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, bool
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, bool
4748
public static function castHttpClient($client, array $a, Stub $stub, bool $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)