Skip to content

Commit 1ef5992

Browse files
committed
Merge branch '6.0' into 6.1
* 6.0: [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
2 parents e71573c + 49bef7d commit 1ef5992

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
@@ -121,7 +121,7 @@ private static function prepareRequest(?string $method, ?string $url, array $opt
121121
}
122122

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

@@ -210,9 +210,11 @@ private static function mergeDefaultOptions(array $options, array $defaultOption
210210

211211
$options += $defaultOptions;
212212

213-
foreach (self::$emptyDefaults ?? [] as $k => $v) {
214-
if (!isset($options[$k])) {
215-
$options[$k] = $v;
213+
if (isset(self::$emptyDefaults)) {
214+
foreach (self::$emptyDefaults as $k => $v) {
215+
if (!isset($options[$k])) {
216+
$options[$k] = $v;
217+
}
216218
}
217219
}
218220

0 commit comments

Comments
 (0)