$_FILES is always set.
authorJan Schneider <jan@horde.org>
Tue, 6 Apr 2010 15:25:32 +0000 (17:25 +0200)
committerJan Schneider <jan@horde.org>
Tue, 6 Apr 2010 21:02:08 +0000 (23:02 +0200)
framework/Browser/lib/Horde/Browser.php

index 33b347f..a1ddf24 100644 (file)
@@ -1060,7 +1060,7 @@ class Horde_Browser
             $tmp_name = $_FILES[$field]['tmp_name'];
         }
 
-        if (!isset($_FILES) || ($error == UPLOAD_ERR_NO_FILE)) {
+        if (empty($_FILES) || ($error == UPLOAD_ERR_NO_FILE)) {
             throw new Horde_Browser_Exception(sprintf('There was a problem with the file upload: No %s was uploaded.', $name), UPLOAD_ERR_NO_FILE);
         } elseif (($error == UPLOAD_ERR_OK) && is_uploaded_file($tmp_name)) {
             if (!filesize($tmp_name)) {