diff --git a/src/Curl/Curl.php b/src/Curl/Curl.php index 3b316c8..a78a7f7 100644 --- a/src/Curl/Curl.php +++ b/src/Curl/Curl.php @@ -336,12 +336,12 @@ class Curl public function exec($ch = null) { $this->responseCookies = array(); - if (!($ch === null)) { - $this->rawResponse = curl_multi_getcontent($ch); - } else { + if ($ch === null) { $this->call($this->beforeSendFunction); $this->rawResponse = curl_exec($this->curl); $this->curlErrorCode = curl_errno($this->curl); + } else { + $this->rawResponse = curl_multi_getcontent($ch); } $this->curlErrorMessage = curl_error($this->curl); $this->curlError = !($this->curlErrorCode === 0);