From: s dot masugata at digicom dot dnp dot co dot jp Operating system: Linux Debian(etch) PHP version: 5.3CVS-2008-08-08 (snap) PHP Bug Type: *General Issues Bug description: Notice: Undefined index@"?:" operator
Description: ------------ When "?:" operator is used, Notice should not be generated. Reproduce code: --------------- <?php error_reporting( E_ALL ); $user_id = $_GET['user_id'] ?: "anonymous"; echo $user_id.PHP_EOL; ?> Expected result: ---------------- anonymous Actual result: -------------- Notice: Undefined index: user_id in /path/to/to/notice.php on line 4 anonymous -- Edit bug report at http://bugs.php.net/?id=45760&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45760&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45760&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45760&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45760&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45760&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45760&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=45760&r=needscript Try newer version: http://bugs.php.net/fix.php?id=45760&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45760&r=support Expected behavior: http://bugs.php.net/fix.php?id=45760&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45760&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45760&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45760&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45760&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45760&r=dst IIS Stability: http://bugs.php.net/fix.php?id=45760&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45760&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45760&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45760&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=45760&r=mysqlcfg