From 2d0c94208455f463d8f983f554475f7cbaae7ce6 Mon Sep 17 00:00:00 2001 From: Shish Date: Wed, 6 Oct 2021 16:59:32 +0000 Subject: [PATCH] fix a surprise string in autocomplete --- ext/autocomplete/main.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);