From 5cc2f467e56272c2eea037fa9969fa416bd73306 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 27 Jul 2022 18:05:11 +0200 Subject: [PATCH] Workaround disabled "var_dump" --- HttpClientTrait.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HttpClientTrait.php b/HttpClientTrait.php index 536d93d..8b6d35e 100644 --- a/HttpClientTrait.php +++ b/HttpClientTrait.php @@ -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))); }