CMS MADE SIMPLE FORGE

CMS Made Simple Core

 

[#12727] Search Module causes error

avatar
Created By: Darren Kierman (kierweb)
Date Submitted: Tue Jun 11 07:20:52 -0400 2024

Assigned To:
Version: 2.2.21
CMSMS Version: 2.2.21
Severity: Major
Resolution: None
State: Open
Summary:
Search Module causes error
Detailed Description:
Error on Search Module, probably PHP 8x issue 

[11-Jun-2024 12:05:30 Europe/London] PHP Fatal error:  Uncaught TypeError:
count(): Argument #1 ($value) must be of type Countable|array, null given in
/modules/Search/action.dosearch.php:204

Fixed with an is_array as follows ….  

if ( (is_array($searchresult)) && (count($searchresult) == 3) ) {


History

Comments
avatar
Date: 2024-06-15 06:26
Posted By: Chris Taylor (chrisbt)

Hi Darren, I've tried to recreate this issue but can't. Could you give some more
details of how to recreate the error. Thanks