mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-10 09:04:26 +02:00
Changed:
- used `$this->getRequestValue($request, 'foo', <bar>)` instead of `$request['foo'] ?? <bar>` - fixed wrong variable naming - changed double-quotes to single - see https://github.com/friendica/friendica/issues/11631#issuecomment-1196410497
This commit is contained in:
parent
5ec407699b
commit
eaed3945d1
21 changed files with 28 additions and 30 deletions
|
@ -77,7 +77,7 @@ class Search extends BaseApi
|
|||
} else {
|
||||
$ret = [];
|
||||
foreach ($mails as $mail) {
|
||||
$ret[] = $this->directMessage->createFromMailId($mail['id'], $uid, $request['getText'] ?? '');
|
||||
$ret[] = $this->directMessage->createFromMailId($mail['id'], $uid, $this->getRequestValue($request, 'getText', ''));
|
||||
}
|
||||
$success = ['success' => true, 'search_results' => $ret];
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ class Delete extends BaseApi
|
|||
// params
|
||||
|
||||
// error if no gid specified
|
||||
if ($request['gid'] == 0 || $request['name'] == "") {
|
||||
if ($request['gid'] == 0 || $request['name'] == '') {
|
||||
throw new BadRequestException('gid or name not specified');
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ class Seen extends BaseApi
|
|||
throw new BadRequestException('Invalid argument count');
|
||||
}
|
||||
|
||||
$id = intval($request['id'] ?? 0);
|
||||
$id = intval($this->getRequestValue($request, 'id', 0));
|
||||
|
||||
$include_entities = $this->getRequestValue($request, 'include_entities', false);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue