From aa6a9b8e51f4e3be6750d50ba4704194467416ac Mon Sep 17 00:00:00 2001 From: Fabian Blechschmidt Date: Tue, 31 Jan 2023 17:57:40 +0100 Subject: [PATCH] Update Httpie.php improve error message for empty url on HTTPie --- src/Utility/Httpie.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Utility/Httpie.php b/src/Utility/Httpie.php index 20e3c2808..93a7e7599 100644 --- a/src/Utility/Httpie.php +++ b/src/Utility/Httpie.php @@ -145,6 +145,9 @@ public function nothrow(bool $on = true): Httpie public function send(?array &$info = null): string { + if($this->url === '') { + throw new \RuntimeException('URL must not be empty to Httpie::send()'); + } $ch = curl_init($this->url); curl_setopt($ch, CURLOPT_USERAGENT, 'Deployer ' . DEPLOYER_VERSION); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $this->method);