Discussions Search problem

12 years 1 month ago - 12 years 1 month ago #1 by geoffc
I have had this problem for a while but only just tracked it down.

If you have the discussions search plugin enabled (default setting when component is installed) and you perform a search with an empty string, you end up with a lot of messages about 'Warning: mb_strpos() [function.mb-strpos]: Empty delimiter in /share/MD0_DATA/Web/Joomla/libraries/phputf8/mbstring/core.php on line 44' and the resulting display shows forum entries with every character separated by a space.

Looking at the code I suspect that what is needed is some code like the following after line 56.

$text = trim($text);
if ($text == '') {
return array();
}

This resolves the problem and also lets the Discussions search module work the same as the other search plugins in the system (Content, Contacts etc.), which do not return any results if an empty string is in the search.

This problem is also in Discussions 1.4 and may have been there for some time. After all its not sensible to search for an empty string but that will not stop someone from trying!

Regards
Geoff

Please Log in or Create an account to join the conversation.

Time to create page: 0.124 seconds
Go To Top

Joomla! Debug Console

Session

Profile Information

Memory Usage

Database Queries