Make WordPress Core

Opened 9 years ago

Closed 8 years ago

#22429 closed enhancement (fixed)

Usage of @$_GET/@$_POST

Reported by: juliobox Owned by: dd32
Milestone: 3.7 Priority: normal
Severity: trivial Version:
Component: Performance Keywords: has-patch commit
Focuses: Cc:



I think we should use isset() in place of @ in front of 6 $_GET and $_POST in the following files:

Example in ajax-actions.php:

<?php selected( @$_GET['m'], 0 ); ?>


<?php selected( isset( $_GET['m'] ) ? $_GET['m'] : 0, 0 ); ?>

@ is also bad at perf.

Attachments (1)

22429.diff (2.8 KB) - added by dd32 8 years ago.

Download all attachments as: .zip

Change History (5)

#2 @juliobox
9 years ago

Thanks Sergey, very good!

8 years ago

#3 @dd32
8 years ago

  • Keywords has-patch commit added
  • Milestone changed from Awaiting Review to 3.7
  • Owner set to dd32
  • Status changed from new to accepted

Ok, these really don't need to be there..

#4 @dd32
8 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 25025:

Remove the usage of @$_GET and @$_POST and just check to see if the indicies are set. Fixes #22429

Note: See TracTickets for help on using tickets.