Bug #80123 [NEW]: Cannot redeclare does not provide include reference

From: Date: Sat, 19 Sep 2020 22:02:52 +0000
Subject: Bug #80123 [NEW]: Cannot redeclare does not provide include reference
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-229083@lists.php.net to get a copy of this message
From: jab_creations at yahoo dot com Operating system: *nix/Win PHP version: 7.4.10 Package: Unknown/Other Function Bug Type: Bug Bug description:Cannot redeclare does not provide include reference Description: ------------ When I have to debug an error like this: Fatal error: Cannot redeclare session() (previously declared in D:\web\sessions.php:2) ...it does not tell me what file included the file with the session function. That forces me to do pointlessly convoluted debug. I've tried doing back tracing however the error is reported and the process shuts down so I don't get the second back trace. Test script: --------------- An overly simplified version: <?php include('file1.php');//includes session.php. include('file2.php');//includes session.php; error spawns, no second back trace. ?> Expected result: ---------------- A much more useful error message would look something like: Fatal error: Cannot redeclare session() (previously declared in D:\web\sessions.php:2, file included by file1.php, file included by file2.php). -- Edit bug report at https://bugs.php.net/bug.php?id=80123&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=80123&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=80123&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=80123&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=80123&r=needscript Try newer version: https://bugs.php.net/fix.php?id=80123&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=80123&r=support Expected behavior: https://bugs.php.net/fix.php?id=80123&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=80123&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=80123&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=80123&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=80123&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=80123&r=dst IIS Stability: https://bugs.php.net/fix.php?id=80123&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=80123&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=80123&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=80123&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=80123&r=mysqlcfg

« previous php.bugs (#229083) next »