ID: 31687
Updated by: [EMAIL PROTECTED]
Reported By: guth at fiifo dot u-psud dot fr
-Status: Open
+Status: Wont fix
Bug Type: Zend Engine 2 problem
Operating System: *
PHP Version: 5.0.3
New Comment:
And what does it help if it's changed again? Won't fix.
Previous Comments:
------------------------------------------------------------------------
[2005-01-25 13:25:32] guth at fiifo dot u-psud dot fr
Description:
------------
hello
Behaviour of Exception::getTrace() has changed in PHP 5.0.3.
There is no mention of this in the PHP ChangeLog, it is a PHP bug.
In PHP 5.0.2, Exception::getTrace() returned the same backtrace than
debug_backtrace().
In PHP 5.0.3, this is broken and Exception::getTrace() return a
different array.
Reproduce code:
---------------
<?php
function A() {
throw new exception;
}
try {
A();
}
catch(Exception $e) {
print_r($e->getTrace());
}
?>
<?php
function A() {
print_r(debug_backtrace());
}
A();
?>
Expected result:
----------------
PHP 5.0.2 (for both reproduce codes) :
Array
(
[0] => Array
(
[file] => /anticorps/www/test.php
[line] => 9
[function] => A
[args] => Array
(
)
)
)
Actual result:
--------------
PHP 5.0.3 :
First code :
Array
(
[0] => Array
(
[file] => /anticorps/www/test.php
[line] => 4
[function] => A
)
[1] => Array
(
[file] => /anticorps/www/test.php
[line] => 9
[function] => A
[args] => Array
(
)
)
)
Second code :
Array
(
[0] => Array
(
[file] => /anticorps/www/test.php
[line] => 9
[function] => A
[args] => Array
(
)
)
)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31687&edit=1