From bd8c4870bc2b85072c70ff52a10b717e4ff5677d Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Thu, 12 Apr 2012 11:17:53 -0700 Subject: [PATCH] Only set the FOLLOWLOCATION curl opt if we are not in safe mode --- S3.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)