Add XDB::runTransaction($callback, $arg1, $arg2, $arg2...) to run a
[platal.git] / classes / plupload.php
index dd037dd..deabf04 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2008 Polytechnique.org                              *
+ *  Copyright (C) 2003-2010 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;
         }