Home » HTML » HTML_Template_Flexy » Bug #3003
{var} replaced with %s
Details
| Submitted | 2004-12-21 12:55 UTC |
|---|---|
| From | matt at moriaritys dot net |
| Assigned | alan_k |
| Status | Closed |
| Package | HTML_Template_Flexy |
| PHP Version | 4.3.9 |
| OS | Mac OS X |
| Roadmaps | (Not assigned) |
Comments
[2004-12-21 12:55 UTC] matt at moriaritys dot net
Description:
------------
I'm using version 1.0.1 of Flexy, and when I use {somevar} in my template, followed by some text, instead of displaying the text, it displays '%s'.
For example, this will work:
Hello, today is {hello}.
But these won't:
Hello, today is {hello}. This is some text
Hello, today is {hello} This is more text
Hello, today is {hello}Text
Reproduce code:
---------------
<?php
class test {
var $hello;
function test() {
$this->hello = date('m/d/Y');
$this->display();
}
function display() {
$t = new HTML_Template_Flexy();
$t->compile('index.html');
$t->outputObject($this);
}
}
new test;
?>
Template:
Hello, today is {hello}. This is a test.
Expected result:
----------------
Hello, today is 12/21/04. This is a test.
Actual result:
--------------
Hello, today is %s. This is a test.
[2004-12-22 20:57 UTC] matt at moriaritys dot net
Fixed it by upgrading and installing Translation2