Bug #79827 [NEW]: debug_backtrace() does not return passed args
From: michael dot vorisek at email dot cz
Operating system: any
PHP version: 7.4.8
Package: Scripting Engine problem
Bug Type: Bug
Bug description:debug_backtrace() does not return passed args
Description:
------------
debug_backtrace() currently returns args by reference, ie. the returned
args variables, not the passed values.
Very hard to debug, backtrace should always return the passed data.
Test script:
---------------
function x(string $filename) {
$filename = realpath($filename);
$trace = debug_backtrace();
var_dump($trace[0]['args']);
}
x('non_existing_file.txt');
Expected result:
----------------
array(1) {
[0]=>
bool(false)
}
Actual result:
--------------
array(1) {
[0]=>
string(21) "non_existing_file.txt"
}
--
Edit bug report at https://bugs.php.net/bug.php?id=79827&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=79827&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=79827&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=79827&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=79827&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=79827&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=79827&r=support
Expected behavior: https://bugs.php.net/fix.php?id=79827&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=79827&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=79827&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=79827&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79827&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=79827&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=79827&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=79827&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=79827&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=79827&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=79827&r=mysqlcfg
Thread (5 messages)
- michael dot vorisek at email dot cz