MyBB Community Forums

Full Version: [F] error in searching item in template admin [C-Michael83]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
admin cp->templates->search template

try to find agreement_1 leaving blank the replace input and you will have:
Warning [2] Missing argument 2 for build_str_ireplace() - Line: 99 - File: inc/functions_compat.php PHP 4.4.7 (Linux)
File 	Line 	Function
[PHP] 	  	errorhandler->error
/inc/functions_compat.php 	99 	build_str_ireplace
/inc/functions_compat.php 	112 	build_str_ireplace
/admin/modules/style/templates.php 	577 	str_ireplace
/admin/index.php 	378 	require
Warning [2] Missing argument 2 for build_str_ireplace() - Line: 99 - File: inc/functions_compat.php PHP 4.4.7 (Linux)
File 	Line 	Function
[PHP] 	  	errorhandler->error
/inc/functions_compat.php 	99 	build_str_ireplace
/inc/functions_compat.php 	112 	build_str_ireplace
/admin/modules/style/templates.php 	577 	str_ireplace
/admin/index.php 	378 	require

mybb version: 1.4.3
php version: 5.2.4
os: ubuntu 5.3
Can't reproduce.

[attachment=11671]
This is only if you have PHP 4

in inc/functions_compat.php find

	function build_str_ireplace(&$pattern, $k)
	{
		$pattern = "#".preg_quote($pattern, "#")."#";
	}

and replace with

	function build_str_ireplace(&$pattern)
	{
		$pattern = "#".preg_quote($pattern, "#")."#";
	}
Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.

With regards,
MyBB Group