diff --git a/ext/autocomplete/main.php b/ext/autocomplete/main.php index 2fce4876..0c7b7368 100644 --- a/ext/autocomplete/main.php +++ b/ext/autocomplete/main.php @@ -15,7 +15,7 @@ class AutoComplete extends Extension global $page; if ($event->page_matches("api/internal/autocomplete")) { - $limit = $_GET["limit"] ?? 0; + $limit = (int)($_GET["limit"] ?? 0); $s = $_GET["s"] ?? null; $res = $this->complete($s, $limit);