diff --git a/module/VuFindHttp/src/VuFindHttp/HttpService.php b/module/VuFindHttp/src/VuFindHttp/HttpService.php index 728c5dbbca729c26659cc7c571c3531781c6a142..b17833f3070c8417366191b181ecb2b40d1a6f4c 100644 --- a/module/VuFindHttp/src/VuFindHttp/HttpService.php +++ b/module/VuFindHttp/src/VuFindHttp/HttpService.php @@ -158,11 +158,13 @@ class HttpService implements HttpServiceInterface * * @return \Zend\Http\Client */ - public function createClient ($url, $method = \Zend\Http\Request::METHOD_GET, $timeout = null) + public function createClient ($url = null, $method = \Zend\Http\Request::METHOD_GET, $timeout = null) { $client = new \Zend\Http\Client(); $client->setMethod($method); - $client->setUri($url); + if (null !== $url) { + $client->setUri($url); + } if ($timeout) { $client->setOptions(array('timeout' => $timeout)); }