diff --git a/classes/Tools.php b/classes/Tools.php index 9dd4f367d..e2217c6e5 100644 --- a/classes/Tools.php +++ b/classes/Tools.php @@ -1277,10 +1277,9 @@ class ToolsCore public static function file_get_contents($url, $use_include_path = false, $stream_context = null, $curl_timeout = 5) { - if ($stream_context == null) + if ($stream_context == null && !strstr($url, 'http')) $stream_context = @stream_context_create(array('http' => array('timeout' => 5))); - - if (in_array(ini_get('allow_url_fopen'), array('On', 'on', '1'))) + if (in_array(ini_get('allow_url_fopen'), array('On', 'on', '1')) || !strstr($url, 'http')) return @file_get_contents($url, $use_include_path, $stream_context); elseif (function_exists('curl_init')) {