From: Mikael Nordfeldth Date: Thu, 22 Jan 2015 11:38:57 +0000 (+0100) Subject: Non-ajax file submissions should throw NoUploadedMediaException X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9f87359d044603e870b52bd2afd2cc183b190ef7;p=quix0rs-gnu-social.git Non-ajax file submissions should throw NoUploadedMediaException --- diff --git a/lib/mediafile.php b/lib/mediafile.php index 4ac33ab7e1..6dd2e79035 100644 --- a/lib/mediafile.php +++ b/lib/mediafile.php @@ -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.'));