[wp-trac] [WordPress Trac] #22429: Usage of @$_GET/@$_POST
WordPress Trac
noreply at wordpress.org
Tue Nov 13 02:13:41 UTC 2012
#22429: Usage of @$_GET/@$_POST
-----------------------------+-------------------------
Reporter: juliobox | Type: enhancement
Status: new | Priority: normal
Milestone: Awaiting Review | Component: Performance
Version: | Severity: trivial
Keywords: |
-----------------------------+-------------------------
Hello
I think we should use '''isset()''' in place of '''@''' in front of 6
$_GET and $_POST in the following files:[[BR]]
''/wp-admin/includes/ajax-actions.php[[BR]]
/wp-admin/includes/media.php[[BR]]
/wp-includes/theme.php''[[BR]]
[[BR]]
Example in ajax-actions.php:[[BR]]
{{{
<?php selected( @$_GET['m'], 0 ); ?>
}}}
becomes
{{{
<?php selected( isset( $_GET['m'] ) ? $_GET['m'] : 0, 0 ); ?>
}}}
@ is also bad at perf.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22429>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list