Req #80367 [NEW]: Show false instead bool in exceptions

From: Date: Fri, 13 Nov 2020 23:10:31 +0000
Subject: Req #80367 [NEW]: Show false instead bool in exceptions
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-230352@lists.php.net to get a copy of this message
From: michael dot vorisek at email dot cz Operating system: PHP version: 7.4.12 Package: Scripting Engine problem Bug Type: Feature/Change Request Bug description:Show false instead bool in exceptions Description: ------------ see https://3v4l.org/ko1WZ false is often an error return type of some previous action and showing explicitly "false" instead of "bool" improves the explanation value of the php output. Test script: --------------- <?php declare(strict_types=1); function x(string $a) {} x(false); Expected result: ---------------- Fatal error: Uncaught TypeError: x(): Argument #1 ($a) must be of type string, false given Actual result: -------------- Fatal error: Uncaught TypeError: x(): Argument #1 ($a) must be of type string, bool given -- Edit bug report at https://bugs.php.net/bug.php?id=80367&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=80367&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=80367&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=80367&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=80367&r=needscript Try newer version: https://bugs.php.net/fix.php?id=80367&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=80367&r=support Expected behavior: https://bugs.php.net/fix.php?id=80367&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=80367&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=80367&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=80367&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=80367&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=80367&r=dst IIS Stability: https://bugs.php.net/fix.php?id=80367&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=80367&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=80367&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=80367&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=80367&r=mysqlcfg

« previous php.bugs (#230352) next »