PEAR is archived and read-only

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

Home » HTML » HTML_Template_Sigma » Bug #5359

replaceBlockfile produces error

Details

Submitted2005-09-11 13:32 UTC
Fromjanosch at scharlipp dot de
StatusBogus
PackageHTML_Template_Sigma
PHP Version4.3.2
OSWindows 98
Roadmaps(Not assigned)

Comments

[2005-09-11 13:32 UTC] janosch at scharlipp dot de

Description:
------------
When using replaceBlockfile or addBlockfile, always the following error appears:

Warning: Invalid argument supplied for foreach() in [PEAR-PATH]\HTML\Template\Sigma.php on line 567

Test script:
---------------
// file test.php
<?php

require_once('HTML/Template/Sigma.php');

$menueTmpl = new HTML_Template_Sigma('', '');
$menueTmpl->loadTemplateFile('test.html', false, false);
$menueTmpl->addBlockfile('MENUE', 'menue', 'menue.html');

$menueTmpl->setCurrentBlock('menue_0');
$menueTmpl->parse('menue_0');

$menueTmpl->show();

?>

// file test.html
<html>
<body>
{MENUE}
</body>
</html>

// file menue.html
<!-- BEGIN menue -->
Hallo
<!-- END menue -->

Expected result:
----------------
<html>
<body>
Hallo
</body>
</html>

Actual result:
--------------
Warning: Invalid argument supplied for foreach() in [PEAR-PATH]\HTML\Template\Sigma.php on line 567
{MENUE}