]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Better test to see if uploaded media exists
authorMikael Nordfeldth <mmn@hethane.se>
Tue, 13 Jan 2015 12:22:23 +0000 (13:22 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Tue, 13 Jan 2015 12:22:23 +0000 (13:22 +0100)
actions/apistatusesupdate.php

index b9c229ed4ecddf5ca8fd767d4c2a73ddf0250de5..d5fc7c994589bec48bf6ddf7e83d66dace56a7f6 100644 (file)
@@ -252,7 +252,7 @@ class ApiStatusesUpdateAction extends ApiAuthAction
                 $this->clientError($e->getMessage(), $e->getCode());
             }
 
-            if (isset($upload)) {
+            if ($upload instanceof MediaFile) {
                 $this->status .= ' ' . $upload->shortUrl();
 
                 /* Do not call shortenlinks until the whole notice has been build */