Bug #79053 [NEW]: No error is reported when using null coalescing operator

From: Date: Wed, 01 Jan 2020 13:27:09 +0000
Subject: Bug #79053 [NEW]: No error is reported when using null coalescing operator
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-224644@lists.php.net to get a copy of this message
From: rubencm at gmail dot com Operating system: PHP version: 7.4.1 Package: *General Issues Bug Type: Bug Bug description:No error is reported when using null coalescing operator Description: ------------ When I try to access to an array offset on a boolean, a notice (a warning in master) is thrown. <?php false['']; // php notice: "Trying to access array offset on value of type bool" ?> But when I use the null coalescing operator with it, that error isn't reported <?php false['']??false; // false, no error ?> I'm not sure, but I think it's not the expected behavior, since possible errors are hidden. -- Edit bug report at https://bugs.php.net/bug.php?id=79053&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=79053&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=79053&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=79053&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=79053&r=needscript Try newer version: https://bugs.php.net/fix.php?id=79053&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=79053&r=support Expected behavior: https://bugs.php.net/fix.php?id=79053&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=79053&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=79053&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=79053&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=79053&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=79053&r=dst IIS Stability: https://bugs.php.net/fix.php?id=79053&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=79053&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=79053&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=79053&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=79053&r=mysqlcfg

« previous php.bugs (#224644) next »