Hi, I get this error when trying to run Advanced User

Fatal error: Call to undefined function: str_ireplace() in /home/sandbox/public_html/sites/all/modules/advuser/advuser_filters.inc on line 389

Drupal 5.5
MySQL database 4.1.22
PHP 4.4.8

Thanks.

Comments

sven33’s picture

Same here

Fatal error: Call to undefined function: str_ireplace() in /clientdata/www/domainname/sites/default/modules/advuser/advuser_filters.inc on line 422

Drupal 5.9
PHP Version 4.4.8

sven33’s picture

maybe something like this would help for PHP 4 systems - http://bytes.com/forum/thread467075.html

sven33’s picture

As a test I added the following code to advuser_filters.inc around line 10

// quick fix for no str_ireplace on PHP 4 platforms - http://bytes.com/forum/thread467075.html
if (!function_exists('str_ireplace')) {
	function str_ireplace($needle, $str, $haystack) {
		return preg_replace("/$needle/i", $str, $haystack);
	}
}

and then I could perform the necessary filtering, that is the module worked as expected.

kaptain_kyle’s picture

Thanks for your quick fix. Worked for me!

Anonymous’s picture

Issue tags: +incorrect php version
Anonymous’s picture

Status: Active » Closed (won't fix)