]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Non-ajax file submissions should throw NoUploadedMediaException
authorMikael Nordfeldth <mmn@hethane.se>
Thu, 22 Jan 2015 11:38:57 +0000 (12:38 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Thu, 22 Jan 2015 11:38:57 +0000 (12:38 +0100)
lib/mediafile.php

index 4ac33ab7e1def91bfbfbb3b42a00173f656f9668..6dd2e79035cb6dd85ddf9b7c954172794458ffb3 100644 (file)
@@ -177,7 +177,7 @@ class MediaFile
                             ' partially uploaded.'));
             case UPLOAD_ERR_NO_FILE:
                 // No file; probably just a non-AJAX submission.
-                return;
+                throw new NoUploadedMediaException($param);
             case UPLOAD_ERR_NO_TMP_DIR:
                 // TRANS: Client exception thrown when a temporary folder is not present to store a file upload.
                 throw new ClientException(_('Missing a temporary folder.'));