From cb52a4cdc2daa45a61c728f5ec83603e6c6a71fa Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Tue, 3 Feb 2015 00:23:12 +0100 Subject: Rework error handling in upload validator Signed-off-by: Florian Pritz --- application/controllers/api/v1/file.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'application/controllers/api/v1') diff --git a/application/controllers/api/v1/file.php b/application/controllers/api/v1/file.php index c291ae879..82060e420 100644 --- a/application/controllers/api/v1/file.php +++ b/application/controllers/api/v1/file.php @@ -27,10 +27,7 @@ class file extends \controllers\api\api_controller { throw new \exceptions\PublicApiException("file/no-file", "No file was uploaded or unknown error occured."); } - $errors = \service\files::verify_uploaded_files($files); - if (!empty($errors)) { - throw new \exceptions\PublicApiException("file/upload-verify-failed", "Failed to verify uploaded file", $errors); - } + \service\files::verify_uploaded_files($files); $limits = $this->muser->get_upload_id_limits(); $urls = array(); -- cgit v1.2.3-24-g4f1b