Skip to content

Commit 9006324

Browse files
bug #47086 Workaround disabled "var_dump" (nicolas-grekas)
This PR was merged into the 4.4 branch. Discussion ---------- Workaround disabled "var_dump" | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #46881 | License | MIT | Doc PR | - Commits ------- 5e80717230 Workaround disabled "var_dump"
2 parents becfdfb + 5cc2f46 commit 9006324

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

HttpClientTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ private static function prepareRequest(?string $method, ?string $url, array $opt
106106
}
107107

108108
// Validate on_progress
109-
if (!\is_callable($onProgress = $options['on_progress'] ?? 'var_dump')) {
109+
if (isset($options['on_progress']) && !\is_callable($onProgress = $options['on_progress'])) {
110110
throw new InvalidArgumentException(sprintf('Option "on_progress" must be callable, "%s" given.', \is_object($onProgress) ? \get_class($onProgress) : \gettype($onProgress)));
111111
}
112112

0 commit comments

Comments
 (0)