MyBB Hacks

Full Version: Quick Edit problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Error:
Fatal error: Call to undefined function format_variable() in /www/freeweb7.com/p/e/r/perfectpredicament/htdocs/forums/xmlhttp.php on line 423

The function is defined in "userformat.php" and I don't know why it says "undefined funciton"
I've gotten this too, but it doesn't seem to stem from MyPlaza. refresh the page and it works.

I dunno what the issue is with it.
Gah, I think I might know.
In xmlhttp.php, just before the ending:

PHP Code:
?>

Add the following:

PHP Code:
function format_variable($var, $format)
{
	if($format && strpos($format, '{variable}') !== false)
		return str_replace('{variable}', $var, $format);
	else
		return $var;
}

I'll think up a better fix in the next version.

Thanks zinga, it worked.
Biggrin
Reference URL's