]> git.mxchange.org Git - friendica.git/commitdiff
Update src/Module/Api/Twitter/Statuses/Destroy.php
authorPhilipp <admin+Github@philipp.info>
Fri, 10 Dec 2021 09:14:30 +0000 (10:14 +0100)
committerGitHub <noreply@github.com>
Fri, 10 Dec 2021 09:14:30 +0000 (10:14 +0100)
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
src/Module/Api/Twitter/Statuses/Destroy.php

index 8c2a8bf3eb6e4d3f841c2123ba4189595602d188..4fd95eaaef6f9c0faf52c76fb28b828418d1ddf8 100644 (file)
@@ -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.');
                }