From: Janusz Dobrowolski Date: Fri, 19 Aug 2011 07:58:47 +0000 (+0200) Subject: Fixed log error during rate retrieval when open_basedir restriction is set. X-Git-Tag: 2.3-final~582 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=82b768d0e2745f161f0b733cbdd251fa7f8ec7d5;p=fa-stable.git Fixed log error during rate retrieval when open_basedir restriction is set. --- diff --git a/gl/includes/db/gl_db_rates.inc b/gl/includes/db/gl_db_rates.inc index 88167b2c..5d98dcb7 100644 --- a/gl/includes/db/gl_db_rates.inc +++ b/gl/includes/db/gl_db_rates.inc @@ -113,7 +113,8 @@ function get_extern_rate($curr_b, $provider = 'ECB', $date) curl_setopt ($ch, CURLOPT_HEADER, 0); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); // prevent warning while save_mode/open_basedir on (redireciton doesn't occur at least on ECB page) - @curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1); + if (!ini_get('save_mode') && !ini_get('open_basedir')) + curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt ($ch, CURLOPT_TIMEOUT, 3); $contents = curl_exec ($ch); curl_close($ch);