PHP5-rc2 coredumps with Smarty-2.6.2, error handler and exceptions

php.internals

Cristiano Duarte

22 years ago
Hi internals, this piece of code causes coredumps with PHP5-RC2: <?php include('Smarty-2.6.2/libs/Smarty.class.php'); function smarty_test($params, $smarty) { //Now we raise a notice about name not being defined //This should get mapped to an Exception return "{$params[name]}"; } function my_error($nr, $text, $file, $line, $vars) { $e = new Exception($text); throw $e; } error_reporting(E_ALL); set_error_handler('my_error'); $s = new Smarty(); $s->register_function('test', 'smarty_test'); $s->display('exception_bug.tpl'); ?> Here is the template(exception_bug.tpl): <html> <head> <title>Exception BUG</title> </head> <body> {test name="ExceptionBugTest"} </body> </html>

Cristiano Duarte

22 years ago
Cristiano Duarte wrote:
> Hi internals, > > this piece of code causes coredumps with PHP5-RC2:
I also tested with latest CVS (2004-05-06). Cristiano Duarte

Derick Rethans

22 years ago
On Thu, 6 May 2004, Cristiano Duarte wrote:
> Cristiano Duarte wrote: > > > Hi internals, > > > > this piece of code causes coredumps with PHP5-RC2: > I also tested with latest CVS (2004-05-06).
File a bug (including a backtrace). Derick

Andi Gutmans

22 years ago
This should be fixed now. At 06:47 PM 5/6/2004 +0200, Derick Rethans wrote: