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 #7359

-

Details

Submitted2006-04-10 20:39 UTC
Fromwojtekb82_23 at tlen dot pl
Assignedpajoye
StatusClosed
PackageHTML_Template_IT
PHP Version4.4.1
OS-
Roadmaps(Not assigned)

Comments

[2006-04-10 20:39 UTC] wojtekb82_23 at tlen dot pl

Description:
------------
php generates "Notice:"

Test script:
---------------
template file:
<!-- BEGIN BLOCK1 -->
Block 1 variable: {VAR_BLOCK1} <br />
<!-- END BLOCK1 -->

<!-- BEGIN BLOCK2 -->
Block 2 variable: {VAR_BLOCK2} <br />
<!-- END BLOCK2 -->

<!-- BEGIN BLOCK3 -->
Block 3 variable: {VAR_BLOCK3} <br />
<!-- END BLOCK3 -->

php file:
<?

error_reporting(E_ALL);

ob_start();

require_once('_HTML/IT.php');
$template = new HTML_Template_IT("./templates");
$template->loadTemplatefile("text.tpl", true, true);

$template->clearCache = true;

for($i = 1; $i<=10; $i++) {
$num = rand(1,3);

$template->setCurrentBlock("BLOCK{$num}");
$template->setVariable("VAR_BLOCK{$num}", rand(100,200));
$template->parseCurrentBlock();

$template->show("BLOCK{$num}");
}

?>