From: Mikael Nordfeldth Date: Tue, 13 Jan 2015 12:22:23 +0000 (+0100) Subject: Better test to see if uploaded media exists X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1d339bb11820cb0f45849d6b379c134012a07afe;p=quix0rs-gnu-social.git Better test to see if uploaded media exists --- diff --git a/actions/apistatusesupdate.php b/actions/apistatusesupdate.php index b9c229ed4e..d5fc7c9945 100644 --- a/actions/apistatusesupdate.php +++ b/actions/apistatusesupdate.php @@ -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 */