[phplib] PHPLib bug From: Aaron Webb (aaron.webb <email protected>)
Date: 03/22/01

Hopefully this is the place to submit a bug in PHPLib ... here goes!

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:
$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);

/* Uncommenting the following line makes it work: */
//$my_error_handler = set_error_handler("$old_error_handler");

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

/* If the above line is uncommented, I can uncomment this line and it works
still: */
//$old_error_handler = set_error_handler("$my_error_handler");

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

Aaron Webb
Software Developer, Core Networks
Aaron.Webb <email protected>
www.CoreNetworks.com

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