FORUMS CLOSED DUE TO SPAM. YOU STILL CAN ADD POST!

Plugin: (more) page metadata

Feed 26 posts, 6 voices

Avatar
3 posts

Just as a follow-up to my last post for future reference. It is a PHP 5.2 thing – callbacks like call_user_func(‘MyClass::myCallbackMethod’) are only available as of PHP 5.2.3. The production environment I’m using is still running 5.1, so I (months later!) fixed the problem by editing /Frog/Framework.php:

On line 824, replace

call_user_func_array($callback, $args);

with

$x = explode('::',$callback);
$className = $x[0];
$func = $x[1];
if($func) # so only class methods are handled this way
{
	call_user_func_array(array( $className, $func ), $args);
}
else
{
	call_user_func_array($callback, $args);
}

Hopefully this helps! It’s an obscure problem and only shows up on PHP 5.1, but it was a doozy to figure out how to fix. Thanks again to M for such a sweet plugin (along with page forms! Awesome.)

 
Avatar
5 posts

Thanks you very much for this fix!!!
It SOLVED the problem!
And regards to M for these beutiful plugins.