PEAR is archived and read-only

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

Home » HTML » HTML_Template_IT » Bug #7611

Typo in IT.php

Details

Submitted2006-05-12 09:40 UTC
Fromjeff at macloue dot org dot ua
Assignedpajoye
StatusClosed
PackageHTML_Template_IT
PHP Version4.4.1
Roadmaps(Not assigned)

Comments

[2006-05-12 09:40 UTC] jeff at macloue dot org dot ua

Description:
------------
In IT.php, in free() method I noticed a typo that prevents parsing several templates. Instead of $this->blocklookup = array(); construction it should be $this->blocklist = array();, I suppose. $blocklookup field is not defined/used elsewhere so I consider this is a typo.

Consequences are that you cannot parse several templates with one class - it throughs a warning on duplicate "__global__" block in the template.

Test script:
---------------
PEAR::setErrorHandling(PEAR_ERROR_PRINT);

$tpl->loadTemplatefile("one.html");
$tpl->setVariable($tplvars);
$tpl->parse();
$tpl->show();

$tpl->loadTemplatefile("another.html");
$tpl->setVariable($tplvars);
$tpl->parse();
$tpl->show();