From: Stéphane Jacob Date: Fri, 10 Sep 2010 12:23:16 +0000 (+0200) Subject: Prevents php warning when trying to retrieve a non-existing image (Closes #1146). X-Git-Tag: core/1.1.1~31 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=adf0fa2119688cf61ca23b7bc23b0730af702c6d;p=platal.git Prevents php warning when trying to retrieve a non-existing image (Closes #1146). Signed-off-by: Stéphane Jacob --- diff --git a/classes/plupload.php b/classes/plupload.php index 7654830..deabf04 100644 --- a/classes/plupload.php +++ b/classes/plupload.php @@ -113,7 +113,11 @@ class PlUpload trigger_error('malformed URL given', E_USER_NOTICE); return false; } - $data = file_get_contents($url); + if (file_exists($url)) { + $data = file_get_contents($url); + } else { + return false; + } if (!$data) { return false; }