A user made an update to PHP 5.2.1 and {get_template_vars} does not work anymore. Got this error
There must be important changes in PHP 5.2.x . foreach goes thru array and find objekt StdClass in $value. But this has no tostring functionality. The fix:Catchable fatal error: Object of class stdClass could not be converted to string in ....get_template_vars.php on line 27
Code: Select all
function smarty_cms_function_get_template_vars($params, &$smarty)
{
global $gCms;
$tpl_vars = $gCms->smarty->get_template_vars();
$str = '';
foreach( $tpl_vars as $key => $value )
{
if (! is_object($value)) # Patch Andre wegen verändertem Verhalten von php Update auf 5.2
$str .= "$key = $value<br/>";
}
return $str;
}
PS: Will we see a CMSms 1.0.5? If yes, when?