[eluser]champs[/eluser]
The following code in the Template Parser class will only substitute strings and arrays -- meaning it ignores numeric typed data.
An example:
Code:
// this line never highlights correctly
/* template snippet */
<Jpeg Quality="{quality}"></Jpeg>
/* controller snippet */
// as a number
$data = array('quality' => 80);
echo $this->parser->parse('view', $data, true);
// echoes '<Jpeg Quality="{quality}"></Jpeg>'
$data = array('quality' => '80');
echo $this->parser->parse('view', $data, true);
// output: '<Jpeg Quality="80"></Jpeg>'
The offending code is in Parser.php ~line 57:
Code:
if (is_string($val))
{
$template = $this->_parse_single($key, $val, $template);
}
elseif (is_array($val))
{
$template = $this->_parse_pair($key, $val, $template);
}
I would substitute the call to is_string() with is_scalar() -- and maybe filter/convert booleans.
This is being posted just as a reference for the bug tracker