]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apimediaupload.php
newnotice action always returns the notice's URL
[quix0rs-gnu-social.git] / actions / apimediaupload.php
index b4f8709fe23071d82b283c36b1f90f9ee602c395..6f8781fab5b57b86b8bfd0e30485ae18b414cece 100644 (file)
@@ -63,7 +63,6 @@ class ApiMediaUploadAction extends ApiAuthAction
                 _('This method requires a POST.'),
                 400, $this->format
             );
-            return;
         }
 
         // Workaround for PHP returning empty $_POST and $_FILES when POST
@@ -79,7 +78,6 @@ class ApiMediaUploadAction extends ApiAuthAction
                       'The server was unable to handle that much POST data (%s bytes) due to its current configuration.',
                       intval($_SERVER['CONTENT_LENGTH']));
             $this->clientError(sprintf($msg, $_SERVER['CONTENT_LENGTH']));
-            return;
         }
 
         $upload = null;
@@ -88,7 +86,6 @@ class ApiMediaUploadAction extends ApiAuthAction
             $upload = MediaFile::fromUpload('media', $this->auth_user->getProfile());
         } catch (Exception $e) {
             $this->clientError($e->getMessage(), $e->getCode());
-            return;
         }
 
         if (isset($upload)) {
@@ -96,7 +93,6 @@ class ApiMediaUploadAction extends ApiAuthAction
         } else {
             // TRANS: Client error displayed when uploading a media file has failed.
             $this->clientError(_('Upload failed.'));
-            return;
         }
     }