PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » HTML » HTML_Template_Flexy » Bug #3003

{var} replaced with %s

Details

Submitted2004-12-21 12:55 UTC
Frommatt at moriaritys dot net
Assignedalan_k
StatusClosed
PackageHTML_Template_Flexy
PHP Version4.3.9
OSMac 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