diff --git a/S3.php b/S3.php index 6f1e0499..739cf387 100644 --- a/S3.php +++ b/S3.php @@ -1817,7 +1817,10 @@ public function getResponse() curl_setopt($curl, CURLOPT_RETURNTRANSFER, false); curl_setopt($curl, CURLOPT_WRITEFUNCTION, array(&$this, '__responseWriteCallback')); curl_setopt($curl, CURLOPT_HEADERFUNCTION, array(&$this, '__responseHeaderCallback')); - curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); + if (!ini_get('safe_mode')) + { + curl_setopt($curl_handle, CURLOPT_FOLLOWLOCATION, true); + } // Request types switch ($this->verb)