mirror of
https://github.com/friendica/friendica
synced 2024-11-09 23:42:53 +00:00
Update src/Module/Api/Twitter/Statuses/Destroy.php
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
This commit is contained in:
parent
e9d8af89c2
commit
245d194f87
1 changed files with 3 additions and 3 deletions
|
@ -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.');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue