ID: 14736 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Won\'t fix Bug Type: Feature/Change Request Operating System: all PHP Version: 4.1.1 New Comment:
This is already possible with @. print @$_GET['id']; Regardless, autoglobals should still report undefined indices, I don't see any advantage in not reporting them but only the introduction of inconsistencies. This will never change, marking as "Won\'t fix". See also: array_key_exists(). Previous Comments: ------------------------------------------------------------------------ [2001-12-28 10:58:15] [EMAIL PROTECTED] suggest that it should be possible to turn off warnning of undefined index of $_GET ans $_POST and so on.. example: such as: url: http://www.domain.com/index.php code: <?php echo $_GET['id']; ?> would cause warnning 'Undefined index' unless the user must type in http://www.domain.com/index.php?id=123 or.... the code should be changed into: <?php if (!empty($_GET['id'])) print $_GET['id']; ?> or maybe: <?php $id = empty($_GET['id'])?0:$_GET['id']; // just like register_global ? ..... echo "id is: $id"; // 'no warnning' for use here ?> of cause, we can turn off warnning for a running website. but....how can the web developers bear it when developing ? it's a 'terrible' warnning message that we don't want, we should have our attentions to those warnning about variables like $foo['bar'] not $_GET['id'] nor $_POST['username'] ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=14736&edit=1