Improved handling of boolean input values

This commit is contained in:
Michael 2022-01-16 09:24:35 +00:00
parent e6108668e3
commit 7b68a5956e
13 changed files with 18 additions and 18 deletions

View file

@ -79,7 +79,7 @@ class Show extends BaseApi
throw new BadRequestException(sprintf("There is no status or conversation with the id %d.", $id));
}
$include_entities = strtolower(($request['include_entities'] ?? 'false') == 'true');
$include_entities = filter_var($request['include_entities'] ?? false, FILTER_VALIDATE_BOOLEAN);
$ret = [];
while ($status = DBA::fetch($statuses)) {