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

- Thread: https://externals.io/message/9690
- Original archive: https://news-web.php.net/php.internals/9690
- Started by Cristiano Duarte on 2004-05-06T16:42:47+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #9690 — Cristiano Duarte — 2004-05-06T16:42:47+00:00

URL: https://externals.io/message/9690#9690

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

---

## #9691 — Cristiano Duarte — 2004-05-06T16:44:01+00:00

URL: https://externals.io/message/9690#9691 · In reply to: #9690

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

---

## #9693 — Derick Rethans — 2004-05-06T16:47:47+00:00

URL: https://externals.io/message/9690#9693 · In reply to: #9691

> Cristiano Duarte wrote:
>
> > […]
> I also tested with latest CVS (2004-05-06).

File a bug (including a backtrace).

Derick
