Better test to see if uploaded media exists

This commit is contained in:
Mikael Nordfeldth 2015-01-13 13:22:23 +01:00
parent db7154c63b
commit 1d339bb118

View File

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