Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.2.2] Using number zero and operator in com_finder search gives error page instead of result #44633

Open
Attila-SWE opened this issue Dec 18, 2024 · 0 comments

Comments

@Attila-SWE
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants