Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.3.1

Bug #9783 some words between "{" and "}" are missing displayed!
Submitted: 2007-01-09 11:23 UTC
From: ustc_frank at sina dot com Assigned: dsp
Status: Closed Package: HTML_Template_IT (version 1.2.1)
PHP Version: 4.3.11 OS: WINDOW XP
Roadmaps: 1.3.0a1    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 18 - 2 = ?

 
 [2007-01-09 11:23 UTC] ustc_frank at sina dot com (Frank Zhang)
Description: ------------ some words between "{" and "}" are missing displayed! Test script: --------------- <?php require_once 'HTML/Template/IT.php'; $data = array ( '0' => array('Stig', '{Bakken}'), // Bug Here: The words between "{" and "}" is MISSING! '1' => array('Martin', 'Jansen'), '2' => array('Alexander', 'Merz') ); $tpl = new HTML_Template_IT('./templates'); $tpl->loadTemplatefile('main.tpl.htm', true, true); foreach ($data as $name) { foreach ($name as $cell) { // Assign data to the inner block $tpl->setCurrentBlock('cell'); $tpl->setVariable('DATA', $cell); // Bug Here: The words between "{" and "}" DO NOT be displayed! $tpl->parseCurrentBlock(); } // Assign data and the inner block to the // outer block $tpl->setCurrentBlock('row'); $tpl->parseCurrentBlock(); } // print the output $tpl->show(); // output: /* Stig // Bug Here: The word "Bakken" MISSING! Martin Jansen Alexander Merz */ ?> Expected result: ---------------- Stig {Bakken} Martin Jansen Alexander Merz Actual result: -------------- Stig Martin Jansen Alexander Merz

Comments

 [2007-01-11 14:06 UTC] aa1 at addihome dot org (Arie Addi)
As a work-around, you can use this before your setVariable: $cell = strtr($cell, '{}', ' '); or if you really want the brackets: $cell = addcslashes($cell, '}');
 [2007-02-01 17:32 UTC] dsp at php dot net (David Soria Parra)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.