Permalink
Browse files

Merge branch 'hotfix/2636'

Close #2636
  • Loading branch information...
2 parents 79086d3 + 07ec95f commit 8bccf751f59d1262ffb20b2d028a7fceb2959d97 @weierophinney weierophinney committed Oct 2, 2012
Showing with 8 additions and 4 deletions.
  1. +8 −4 library/Zend/Http/Client/Adapter/Curl.php
View
12 library/Zend/Http/Client/Adapter/Curl.php
@@ -204,11 +204,15 @@ public function connect($host, $port = 80, $secure = false)
curl_setopt($this->curl, CURLOPT_PORT, intval($port));
}
- // Set timeout
- curl_setopt($this->curl, CURLOPT_CONNECTTIMEOUT, $this->config['timeout']);
+ if (isset($this->config['timeout'])) {
+ // Set timeout
+ curl_setopt($this->curl, CURLOPT_CONNECTTIMEOUT, $this->config['timeout']);
+ }
- // Set Max redirects
- curl_setopt($this->curl, CURLOPT_MAXREDIRS, $this->config['maxredirects']);
+ if (isset($this->config['maxredirects'])) {
+ // Set Max redirects
+ curl_setopt($this->curl, CURLOPT_MAXREDIRS, $this->config['maxredirects']);
+ }
if (!$this->curl) {
$this->close();

0 comments on commit 8bccf75

Please sign in to comment.