Skip to content

Commit

Permalink
bug #47086 Workaround disabled "var_dump" (nicolas-grekas)
Browse files Browse the repository at this point in the history
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"
  • Loading branch information
nicolas-grekas committed Jul 27, 2022
2 parents becfdfb + 5cc2f46 commit 9006324
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion HttpClientTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private static function prepareRequest(?string $method, ?string $url, array $opt
}

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

Expand Down

0 comments on commit 9006324

Please sign in to comment.