Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f432349

Browse files
bug #45585 [HttpClient] fix checking for unset property on PHP <= 7.1.4 (nicolas-grekas)
This PR was merged into the 4.4 branch. Discussion ---------- [HttpClient] fix checking for unset property on PHP <= 7.1.4 | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - As spotted by the CI and confirmed here: https://3v4l.org/2Xv3N Commits ------- 721996a [HttpClient] fix checking for unset property on PHP <= 7.1.4
2 parents 0ed2a8f + 721996a commit f432349

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpClient/HttpClientTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ private static function mergeDefaultOptions(array $options, array $defaultOption
189189

190190
$options += $defaultOptions;
191191

192-
foreach (self::$emptyDefaults ?? [] as $k => $v) {
192+
foreach (isset(self::$emptyDefaults) ? self::$emptyDefaults : [] as $k => $v) {
193193
if (!isset($options[$k])) {
194194
$options[$k] = $v;
195195
}

0 commit comments

Comments
 (0)