1
0
Fork 0

Update src/Module/Api/Twitter/Statuses/Destroy.php

Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
This commit is contained in:
Philipp 2021-12-10 10:14:30 +01:00 committed by GitHub
parent e9d8af89c2
commit 245d194f87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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.');
}