Skip to content

Commit e46c823

Browse files
authored
Limit length of searchterm to prevent MysqliStatement error (#45445)
1 parent d392424 commit e46c823

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/com_finder/src/Helper/FinderHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public static function logSearch(Query $searchquery, $resultCount = 0)
5454
$temp = new \stdClass();
5555
$temp->input = trim(strtolower((string) $searchquery->input));
5656
$entry = new \stdClass();
57-
$entry->searchterm = $temp->input;
57+
$entry->searchterm = mb_substr(trim($temp->input), 0, 255);
5858
$entry->query = serialize($temp);
5959
$entry->md5sum = md5($entry->query);
6060
$entry->hits = 1;

0 commit comments

Comments
 (0)