From 9f87359d044603e870b52bd2afd2cc183b190ef7 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Thu, 22 Jan 2015 12:38:57 +0100 Subject: [PATCH] Non-ajax file submissions should throw NoUploadedMediaException --- lib/mediafile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.')); -- 2.39.5