Skip to content

Commit 49bef7d

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: [Messenger] Fix function name in TriggerSql on postgresql bridge to support table name with schema [HttpClient] Fix the CS fix Workaround disabled "var_dump" [Serializer] Respect default context in DateTimeNormalizer::denormalize # Conflicts: # src/Symfony/Component/ErrorHandler/ErrorHandler.php # src/Symfony/Component/HttpKernel/EventListener/DebugHandlersListener.php
2 parents 297e596 + 5c5c37e commit 49bef7d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

HttpClientTrait.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ private static function prepareRequest(?string $method, ?string $url, array $opt
117117
}
118118

119119
// Validate on_progress
120-
if (!\is_callable($onProgress = $options['on_progress'] ?? 'var_dump')) {
120+
if (isset($options['on_progress']) && !\is_callable($onProgress = $options['on_progress'])) {
121121
throw new InvalidArgumentException(sprintf('Option "on_progress" must be callable, "%s" given.', get_debug_type($onProgress)));
122122
}
123123

@@ -206,9 +206,11 @@ private static function mergeDefaultOptions(array $options, array $defaultOption
206206

207207
$options += $defaultOptions;
208208

209-
foreach (self::$emptyDefaults ?? [] as $k => $v) {
210-
if (!isset($options[$k])) {
211-
$options[$k] = $v;
209+
if (isset(self::$emptyDefaults)) {
210+
foreach (self::$emptyDefaults as $k => $v) {
211+
if (!isset($options[$k])) {
212+
$options[$k] = $v;
213+
}
212214
}
213215
}
214216

0 commit comments

Comments
 (0)