mirror of
https://github.com/friendica/friendica
synced 2025-04-25 11:10:11 +00:00
Improved handling of boolean input values
This commit is contained in:
parent
e6108668e3
commit
7b68a5956e
13 changed files with 18 additions and 18 deletions
|
@ -95,7 +95,7 @@ class Statuses extends BaseApi
|
|||
$params = ['order' => ['id' => true], 'limit' => [$start, $count]];
|
||||
$statuses = Post::selectForUser($uid, [], $condition, $params);
|
||||
|
||||
$include_entities = strtolower(($request['include_entities'] ?? 'false') == 'true');
|
||||
$include_entities = filter_var($request['include_entities'] ?? false, FILTER_VALIDATE_BOOLEAN);
|
||||
|
||||
$items = [];
|
||||
while ($status = $this->dba->fetch($statuses)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue