From e4dfcb24686387cab9dc9c557594c3b73a4dab31 Mon Sep 17 00:00:00 2001 From: nick Date: Tue, 20 May 2025 14:55:43 +0700 Subject: [PATCH] Converted numeric values to string in responses for autocomplete calls --- src/Plugin/Autocomplete/Handler.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Plugin/Autocomplete/Handler.php b/src/Plugin/Autocomplete/Handler.php index 07dd2d70..319ff627 100644 --- a/src/Plugin/Autocomplete/Handler.php +++ b/src/Plugin/Autocomplete/Handler.php @@ -116,6 +116,12 @@ public function getSuggestions(array $phrases, int $maxCount = 10): array { // so in the end, we wind up with multiple suggestions for the same phrase /** @var array $suggestions */ $suggestions = array_unique(Arrays::blend(...$combinationSets)); + foreach ($suggestions as &$suggestion) { + if (!is_numeric($suggestion)) { + continue; + } + $suggestion = (string)$suggestion; + } return $suggestions; }