Fatal Error - PHP 8.4 - shuts down website with WP Cerber 9.6.10

Site on php 8.4 - and getting PHP Fatal error with latest version of FREE 9.6.10 WP Cerber

PHP Fatal error:  Uncaught Error: Call to undefined function mb_ereg_replace() in /home/xxx/public_html/wp-content/plugins/wp-cerber/cerber-settings.php:273

which is this line

	if ( $regex ) {
		global $_regex;
		$_regex = $regex;
		$list = array_map( function ( $e ) {
			global $_regex;

			return mb_ereg_replace( $_regex, '', $e );
		}, $list );
	}

ereg_replace function was DEPRECATED in PHP 5.3.0, and REMOVED in PHP 7.0.0. So you must have to use preg_replace() function instead of ereg_replace().

I could not find a list of the accepted PHP Versions - but doesn’t seem that PHP 8.4 and WP Cerber 9.6.10 work

Thank you
Sarah

The mb_ereg_replace() is not the same as ereg_replace() and it’s not deprecated or removed. It is part of the non-default mbstring PHP extension for handling multibyte strings.

But I have to agree that Cerber should not use it without checking because mbstring extension is not guaranteed to be enabled even if WordPress recommends it.