]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/imagefile.php
Updated .form_settings fieldset fieldset styles
[quix0rs-gnu-social.git] / lib / imagefile.php
index 88f46148140b3d9904074e583d5dc74bc7fafc84..cf1668f20373a092c791e71a706608493d0848a8 100644 (file)
@@ -72,14 +72,19 @@ class ImageFile
             break;
          case UPLOAD_ERR_INI_SIZE:
          case UPLOAD_ERR_FORM_SIZE:
-            throw new Exception(sprintf(_('That file is too big. The maximum file size is %d.'),
+            throw new Exception(sprintf(_('That file is too big. The maximum file size is %s.'),
                 ImageFile::maxFileSize()));
             return;
          case UPLOAD_ERR_PARTIAL:
             @unlink($_FILES[$param]['tmp_name']);
             throw new Exception(_('Partial upload.'));
             return;
+         case UPLOAD_ERR_NO_FILE:
+            // No file; probably just a non-AJAX submission.
+            return;
          default:
+            common_log(LOG_ERR, __METHOD__ . ": Unknown upload error " .
+                $_FILES[$param]['error']);
             throw new Exception(_('System error uploading file.'));
             return;
         }