From 245d194f87fc13291800c56c557f09c18c52508d Mon Sep 17 00:00:00 2001 From: Philipp Date: Fri, 10 Dec 2021 10:14:30 +0100 Subject: [PATCH] Update src/Module/Api/Twitter/Statuses/Destroy.php Co-authored-by: Hypolite Petovan --- src/Module/Api/Twitter/Statuses/Destroy.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Module/Api/Twitter/Statuses/Destroy.php b/src/Module/Api/Twitter/Statuses/Destroy.php index 8c2a8bf3e..4fd95eaae 100644 --- a/src/Module/Api/Twitter/Statuses/Destroy.php +++ b/src/Module/Api/Twitter/Statuses/Destroy.php @@ -40,10 +40,10 @@ class Destroy extends BaseApi BaseApi::checkAllowedScope(BaseApi::SCOPE_READ); $uid = BaseApi::getCurrentUserID(); - if (empty($this->parameters['id']) && !empty($request['id'])) { - $id = intval($request['id']); - } elseif (!empty($this->parameters['id'])) { + if (!empty($this->parameters['id'])) { $id = (int)$this->parameters['id']; + } elseif (!empty($request['id'])) { + $id = (int)$request['id']; } else { throw new BadRequestException('An id is missing.'); }