From 96a8dfe711f282abd9ef83d0a85404bcd2bdf6ad Mon Sep 17 00:00:00 2001 From: Zach Borboa Date: Wed, 9 Jun 2021 23:12:55 -0400 Subject: [PATCH] Fix base_url on MultiCurl --- src/Curl/MultiCurl.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Curl/MultiCurl.php b/src/Curl/MultiCurl.php index 5626452..e63a343 100644 --- a/src/Curl/MultiCurl.php +++ b/src/Curl/MultiCurl.php @@ -73,7 +73,7 @@ class MultiCurl $query_parameters = $url; $url = $this->baseUrl; } - $curl = new Curl(); + $curl = new Curl($this->baseUrl); $this->queueHandle($curl); $curl->setUrl($url, $query_parameters); $curl->setOpt(CURLOPT_CUSTOMREQUEST, 'DELETE'); @@ -92,7 +92,7 @@ class MultiCurl */ public function addDownload($url, $mixed_filename) { - $curl = new Curl(); + $curl = new Curl($this->baseUrl); $this->queueHandle($curl); $curl->setUrl($url); @@ -156,7 +156,7 @@ class MultiCurl $data = $url; $url = $this->baseUrl; } - $curl = new Curl(); + $curl = new Curl($this->baseUrl); $this->queueHandle($curl); $curl->setUrl($url, $data); $curl->setOpt(CURLOPT_CUSTOMREQUEST, 'GET'); @@ -179,7 +179,7 @@ class MultiCurl $data = $url; $url = $this->baseUrl; } - $curl = new Curl(); + $curl = new Curl($this->baseUrl); $this->queueHandle($curl); $curl->setUrl($url, $data); $curl->setOpt(CURLOPT_CUSTOMREQUEST, 'HEAD'); @@ -202,7 +202,7 @@ class MultiCurl $data = $url; $url = $this->baseUrl; } - $curl = new Curl(); + $curl = new Curl($this->baseUrl); $this->queueHandle($curl); $curl->setUrl($url, $data); $curl->removeHeader('Content-Length'); @@ -226,7 +226,7 @@ class MultiCurl $url = $this->baseUrl; } - $curl = new Curl(); + $curl = new Curl($this->baseUrl); if (is_array($data) && empty($data)) { $curl->removeHeader('Content-Length'); @@ -259,7 +259,7 @@ class MultiCurl $url = $this->baseUrl; } - $curl = new Curl(); + $curl = new Curl($this->baseUrl); $this->queueHandle($curl); if (is_array($data) && empty($data)) { @@ -296,7 +296,7 @@ class MultiCurl $data = $url; $url = $this->baseUrl; } - $curl = new Curl(); + $curl = new Curl($this->baseUrl); $this->queueHandle($curl); $curl->setUrl($url); $curl->setOpt(CURLOPT_CUSTOMREQUEST, 'PUT'); @@ -323,7 +323,7 @@ class MultiCurl $data = $url; $url = $this->baseUrl; } - $curl = new Curl(); + $curl = new Curl($this->baseUrl); $this->queueHandle($curl); $curl->setUrl($url); $curl->setOpt(CURLOPT_CUSTOMREQUEST, 'SEARCH');