From 6e864910c046a2beb70bde73f37f5bdef628ed18 Mon Sep 17 00:00:00 2001 From: foaly-nr1 Date: Tue, 17 Jan 2012 21:03:17 +0100 Subject: [PATCH] check if open_basedir is set before setting CURLOPT_FOLLOWLOCATION. --- helpers/SG_iCal_Parser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers/SG_iCal_Parser.php b/helpers/SG_iCal_Parser.php index 5a68576..820f361 100755 --- a/helpers/SG_iCal_Parser.php +++ b/helpers/SG_iCal_Parser.php @@ -44,7 +44,7 @@ class SG_iCal_Parser { $c = curl_init(); curl_setopt($c, CURLOPT_URL, $resource); curl_setopt($c, CURLOPT_RETURNTRANSFER, true); - if( !ini_get('safe_mode') ){ + if( !ini_get('safe_mode') && !ini_get('open_basedir') ){ curl_setopt($c, CURLOPT_FOLLOWLOCATION, true); } $content = curl_exec($c);