]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/mediafile.php
(Puctuation) consistency in clientError() calls.
[quix0rs-gnu-social.git] / lib / mediafile.php
index d4d184dd0fd37b79165e97ff452d9b0736c0e5e5..29d752f0c6c9a8489e7b209ea356af9677e07a07 100644 (file)
@@ -152,6 +152,9 @@ class MediaFile
             throw new ClientException(_('The uploaded file was only' .
                 ' partially uploaded.'));
             return;
+        case UPLOAD_ERR_NO_FILE:
+            // No file; probably just a non-AJAX submission.
+            return;
         case UPLOAD_ERR_NO_TMP_DIR:
             throw new ClientException(_('Missing a temporary folder.'));
             return;
@@ -162,6 +165,8 @@ class MediaFile
             throw new ClientException(_('File upload stopped by extension.'));
             return;
         default:
+            common_log(LOG_ERR, __METHOD__ . ": Unknown upload error " .
+                $_FILES[$param]['error']);
             throw new ClientException(_('System error uploading file.'));
             return;
         }