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

From: Date: Thu, 06 May 2004 16:42:47 +0000
Subject: PHP5-rc2 coredumps with Smarty-2.6.2, error handler and exceptions
Groups: php.internals 
Request: Send a blank email to internals+get-9690@lists.php.net to get a copy of this message
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>

« previous php.internals (#9690) next »