summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
Diffstat (limited to 'actions')
-rw-r--r--actions/apistatusesupdate.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/actions/apistatusesupdate.php b/actions/apistatusesupdate.php
index 3a030f0fe..898a4bd72 100644
--- a/actions/apistatusesupdate.php
+++ b/actions/apistatusesupdate.php
@@ -192,7 +192,13 @@ class ApiStatusesUpdateAction extends ApiAuthAction
}
$upload = null;
- $upload = MediaFile::fromUpload('media', $this->user);
+
+ try {
+ $upload = MediaFile::fromUpload('media', $this->user);
+ } catch (ClientException $ce) {
+ $this->clientError($ce->getMessage());
+ return;
+ }
if (isset($upload)) {
$status_shortened .= ' ' . $upload->shortUrl();