Release plat/al core v1.1.13
[platal.git] / classes / plupload.php
index 7654830..e903e92 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2010 Polytechnique.org                              *
+ *  Copyright (C) 2003-2011 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -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;
         }
@@ -312,5 +316,5 @@ class PlUpload
         return null;
     }
 }
-// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker fenc=utf-8:
 ?>