[eluser]heavenquake[/eluser]
In the template parser's parse() method you will find this:
Code:
foreach ($data as $key => $val)
{
if (is_array($val))
{
$template = $this->_parse_pair($key, $val, $template);
}
else
{
$template = $this->_parse_single($key, (string)$val, $template);
}
}
if $val is an object, it erroneously get's treated as a string, which will give errors, while it should just treat it as an array.
the fix is to add a check for objects in the same line. I tested, the rest of the code runs great this way without glitches.
Code:
foreach ($data as $key => $val)
{
if (is_array($val) || is_object($val))
{
$template = $this->_parse_pair($key, $val, $template);
}
else
{
$template = $this->_parse_single($key, (string)$val, $template);
}
}
you will also need to update the _parse_pair method in order to recurse correctly
Code:
foreach ($row as $key => $val)
{
if ( ! is_array($val) && ! is_object)
{
$temp = $this->_parse_single($key, $val, $temp);
}
else
{
$temp = $this->_parse_pair($key, $val, $temp);
}
}