ID:               45760
 Updated by:       [EMAIL PROTECTED]
-Summary:          Notice: Undefined index@"?:" operator
 Reported By:      s dot masugata at digicom dot dnp dot co dot jp
-Status:           Open
+Status:           Bogus
 Bug Type:         *General Issues
 Operating System: Linux Debian(etch)
 PHP Version:      5.3CVS-2008-08-08 (snap)
 New Comment:

Hello, That behavior is expected. Coming soon it be documented.

Thanks.


Previous Comments:
------------------------------------------------------------------------

[2008-08-08 09:45:03] s dot masugata at digicom dot dnp dot co dot jp

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 this bug report at http://bugs.php.net/?id=45760&edit=1

Reply via email to