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 */