[phplib] [Fwd: PHPLib bug] From: Kristian Köhntopp (kk <email protected>)
Date: 03/22/01

-- 
Kristian Köhntopp, NetUSE AG Siemenswall, D-24107 Kiel
Tel: +49 431 386 436 00, Fax: +49 431 386 435 99

attached mail follows:


Hi there. To whom should I submit what I think is a bug in the template class?

I'll include the bug in case it's yourself or someone you can forward to:

When using the PHPLib template class, I can't set my own error handler function. If I do, whenever I try to parse my file, I get the error "Undefined index: MyFileHandle" in template.inc on line 304. Here's the code. It works if I simply put the set_error_handler() function after the phplib stuff, or if I set the error handler back to the old one before I use the phplib stuff.

$old_error_handler = set_error_handler("error_handler");

$my_color = "blue";

$t = new Template("/path/to/templates/");

$t->set_file("MyFileHandle","testtem.tem");

$t->set_var("some_color",$my_color);

$t->parse("MyOutput","MyFileHandle");

$t->p("MyOutput"); exit;

Aaron Webb Software Developer, Core Networks (902) 481-5750 ext 2178 Aaron.Webb <email protected> www.CoreNetworks.com

--------------------------------------------------------------------- To unsubscribe, e-mail: phplib-unsubscribe <email protected> For additional commands, e-mail: phplib-help <email protected>