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>

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to