From 15dd1cf96f0874a28347175e3d3a23fc0f284435 Mon Sep 17 00:00:00 2001 From: gRoussac Date: Mon, 16 Sep 2013 17:16:11 +0200 Subject: [PATCH] [-] BO : Fix bugPSCFV-10249 images copy when unix path --- classes/Tools.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/classes/Tools.php b/classes/Tools.php index bc0721a84..6e2a4030a 100644 --- a/classes/Tools.php +++ b/classes/Tools.php @@ -1412,7 +1412,12 @@ class ToolsCore $stream_context = @stream_context_create(array('http' => array('timeout' => 10))); if (in_array(@ini_get('allow_url_fopen'), array('On', 'on', '1')) || !preg_match('/^https?:\/\//', $source)) - return @copy($source, $destination, $stream_context); + { + if (!is_null($stream_context)) + return @copy($source, $destination, $stream_context); + else + return @copy($source, $destination); + } elseif (function_exists('curl_init')) { $curl = curl_init();