No Code Attached Yet bug
avatar Attila-SWE
Attila-SWE
18 Dec 2024

Steps to reproduce the issue

Search for "between 0 and 1" with com_finder search function
Search for "test ,something and something else"

Expected result

Result page

Actual result

Error: Attempt to modify property "matches" on null

System information (as much as possible)

Joomla 5.2.2

Additional comments

Issue is when 0 is combined with operator or when comma is added to beginning of word with operator in search field

It happens when JROOT/administrator/components/com_finder/src/Indexer/Query.php creates $token with

$token = Helper::tokenize($terms[$i], $lang, true);

which yields an empty array from administrator/components/com_finder/src/Indexer/Helper.php

It is in turn because row 107:

$terms = array_filter($terms);

removes 0 because array_filter without callback does that. The reason for the comma issue is also array_filter. Should it be specified which false values should be removed in helper with callback for array_filter?

avatar Attila-SWE Attila-SWE - open - 18 Dec 2024
avatar joomla-cms-bot joomla-cms-bot - change - 18 Dec 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 18 Dec 2024
avatar QuyTon QuyTon - change - 16 Jan 2025
Labels Added: bug
avatar QuyTon QuyTon - labeled - 16 Jan 2025

Add a Comment

Login with GitHub to post a comment