PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » HTML » HTML_Template_IT » Bug #4590

HTML_Template_IT::getfile doesn't exist

Details

Submitted2005-06-14 13:42 UTC
Frombugs at alcopop dot org
Assignedpajoye
StatusClosed
PackageHTML_Template_IT
PHP Version4.3.2
OSLinux
Roadmaps(Not assigned)

Comments

[2005-06-14 13:42 UTC] bugs at alcopop dot org

Description:
------------
The example given in the HTML_Template_IT failed for me; there was no output to the screen. I added code to test the return value of loadTemplatefile; it returned false.

Faced with no further diagnostic info I dug into the IT.php file and found the line
$template = $this->getfile($filename);$

'getfile' is not defined in the class HTML_Template_IT; nor can grep find it in any files in /usr/share/pear. By reading the file manually and using loadTemplate, everything works.

Reproduce code:
---------------
The example at http://pear.php.net/manual/en/package.html.html-template-it.intro.php

Expected result:
----------------
The expected output is present at the same URL.

Actual result:
--------------
No output at all. Workaround code:

if(!$tpl->loadTemplatefile("main.tpl.htm", true, true))
{
print "<h1>error: loadTemplatefile failed</h1>\n";
$file = file_get_contents("main.tpl.htm");
$tpl->setTemplate($file,true,true);
}