Home » HTML » HTML_Template_IT » Bug #7359
-
Details
| Submitted | 2006-04-10 20:39 UTC |
|---|---|
| From | wojtekb82_23 at tlen dot pl |
| Assigned | pajoye |
| Status | Closed |
| Package | HTML_Template_IT |
| PHP Version | 4.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}");
}
?>