[core] don't pass strings to functions that want ints

This commit is contained in:
Shish
2024-01-15 14:21:33 +00:00
parent 8a895113f3
commit 4e789040a0
2 changed files with 4 additions and 4 deletions

View File

@ -262,7 +262,7 @@ class OuroborosAPI extends Extension
throw new SCoreException("update not implemented");
} elseif ($this->match('show')) {
// Show
$id = !empty($_REQUEST['id']) ? filter_var($_REQUEST['id'], FILTER_SANITIZE_NUMBER_INT) : null;
$id = !empty($_REQUEST['id']) ? (int)filter_var($_REQUEST['id'], FILTER_SANITIZE_NUMBER_INT) : null;
$this->postShow($id);
} elseif ($this->match('index') || $this->match('list')) {
// List