Bug #78842 [Opn->Nab]: Throwable ->getTrace() no longer returns "args"

From: Date: Wed, 20 Nov 2019 11:49:33 +0000
Subject: Bug #78842 [Opn->Nab]: Throwable ->getTrace() no longer returns "args"
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-223811@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78842&edit=1 ID: 78842 Updated by: cmb@php.net Reported by: alex dot tartan at gmail dot com Summary: Throwable ->getTrace() no longer returns "args" -Status: Open +Status: Not a bug Type: Bug Package: *General Issues Operating System: Ubuntu 18.04 PHP Version: 7.4.0RC6 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: You have to disable zend.exception_ignore_args to see these arguments[1]. [1] <https://www.php.net/manual/en/migration74.other-changes.php#migration74.other-changes.ini> Previous Comments: ------------------------------------------------------------------------ [2019-11-20 11:26:29] alex dot tartan at gmail dot com 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 this bug report at https://bugs.php.net/bug.php?id=78842&edit=1

« previous php.bugs (#223811) next »