Re: #45351: Exception::getTrace() should return 'object' array-element
| From: | Kalle Sommer Nielsen | Date: | Sun, 13 Jun 2010 13:05:12 +0000 |
| Subject: | Re: #45351: Exception::getTrace() should return 'object' array-element | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-48756@lists.php.net to get a copy of this message | ||
Hello Jille
2010/6/13 Jille Timmermans <jille@quis.cx>:
> http://bugs.php.net/45351
>
> I have attached a patch to the feature request. IIRC I should just ask
> here whether someone is willing to commit it. So, anyone willing to help
> me? :)
The patch is incorrect (according to what the user requests, and for
consistency with debug_backtrace()). What the patch should do is to:
1) Add a new parameter to the arginfo, so reflection can pick this new
parameter up, named provide_object
2) Alter the implementation of Exception::getTrace(),
::getTraceAsString() and possibly also ::__toString() so it sends to
the proper parameters to the function that builds the trace
array/string
If you simply change the 0 to 1, then it will be forced every time,
and without looking closer to the implementation i can imagine it
could cause some unwanted overheat if its not used, or lookup time.
--
regards,
Kalle Sommer Nielsen
kalle@php.net