Skip to content

Commit

Permalink
Workaround disabled "var_dump"
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Jul 27, 2022
1 parent 992d84c commit 5cc2f46
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 5cc2f46

Please sign in to comment.