From 1d339bb11820cb0f45849d6b379c134012a07afe Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Tue, 13 Jan 2015 13:22:23 +0100 Subject: [PATCH] Better test to see if uploaded media exists --- actions/apistatusesupdate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 */ -- 2.39.5