Bug #78842 [NEW]: Throwable ->getTrace() no longer returns "args"
| From: | alex dot tartan at gmail dot com | Date: | Wed, 20 Nov 2019 11:26:29 +0000 |
| Subject: | Bug #78842 [NEW]: Throwable ->getTrace() no longer returns "args" | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-223810@lists.php.net to get a copy of this message | ||
From: alex dot tartan at gmail dot com
Operating system: Ubuntu 18.04
PHP version: 7.4.0RC6
Package: *General Issues
Bug Type: Bug
Bug description:Throwable ->getTrace() no longer returns "args"
Description:
------------
Hello,
I've ran into an issue while testing out 7.4.0~rc6
The 7.3 version "properly" returns the "args" key in the getTrace()
items.
Is this "non-args" behavior intended?
I saw that
debug_backtrace has a DEBUG_BACKTRACE_IGNORE_ARGS option
to improve performance.
Was this adopted by getTrace() as default?
Test script:
---------------
$x = new Exception();
var_dump($x->getTrace()[0]['args'] ?? []);
var_dump(debug_backtrace()[0]['args']);
Expected result:
----------------
The "args" key should be present in the trace items:
/code/test/Common/Service/Logger/Formatter/ExceptionFormatterTest.php:23:
array(2) {
[0] =>
string(5) "param"
[1] =>
array(1) {
'paramKey' =>
int(1)
}
}
/code/test/Common/Service/Logger/Formatter/ExceptionFormatterTest.php:24:
array(2) {
[0] =>
string(5) "param"
[1] =>
array(1) {
'paramKey' =>
int(1)
}
}
Actual result:
--------------
/code/test/Common/Service/Logger/Formatter/ExceptionFormatterTest.php:23:
array(0) {
}
/code/test/Common/Service/Logger/Formatter/ExceptionFormatterTest.php:24:
array(2) {
[0] =>
string(5) "param"
[1] =>
array(1) {
'paramKey' =>
int(1)
}
}
--
Edit bug report at https://bugs.php.net/bug.php?id=78842&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=78842&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=78842&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=78842&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=78842&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=78842&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=78842&r=support
Expected behavior: https://bugs.php.net/fix.php?id=78842&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=78842&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=78842&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=78842&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=78842&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=78842&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=78842&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=78842&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=78842&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=78842&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=78842&r=mysqlcfg