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

Bug #10050 Touched blocks do not respect removeUnknownVariables
Submitted: 2007-02-07 23:11 UTC
From: miroslav dot zacek at symblaze dot cz Assigned: dsp
Status: Closed Package: HTML_Template_IT (version 1.2.1)
PHP Version: Irrelevant OS: Linux
Roadmaps: 1.3.0a1    
Subscription  


 [2007-02-07 23:11 UTC] miroslav dot zacek at symblaze dot cz (Miroslav Zacek)
Description: ------------ A touched block with all unset variables will be displayed with variable names (like {XXX}) even though the removeUnknownVariables option is set. The removal is done on line 577 in IT.php but only if at least one variable in the block is set; this is the condition: if (!$flag_recursion && 0 != count($values)) { .... //remove empty variables } See the code near line 583 of IP.php, the removal of unset variables is missing here if no variable was set in the block ($empty == true): if ($empty) { // here the removal is missing if (!$this->removeEmptyBlocks) { $this->blockdata[$block ].= $outer; } else { if (isset($this->touchedBlocks[$block])) { $this->blockdata[$block] .= $outer; unset($this->touchedBlocks[$block]); } } } else { if (empty($this->blockdata[$block])) { $this->blockdata[$block] = $outer; } else { $this->blockdata[$block] .= $outer; } }

Comments

 [2007-02-12 20:40 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.