Make WordPress Core


Ignore:
Timestamp:
08/15/2013 06:05:54 AM (12 years ago)
Author:
dd32
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/media.php

    r24974 r25025  
    20782078
    20792079$month_count = count($arc_result);
     2080$selected_month = isset( $_GET['m'] ) ? $_GET['m'] : 0;
    20802081
    20812082if ( $month_count && !( 1 == $month_count && 0 == $arc_result[0]->mmonth ) ) { ?>
    20822083<select name='m'>
    2083 <option<?php selected( @$_GET['m'], 0 ); ?> value='0'><?php _e('Show all dates'); ?></option>
     2084<option<?php selected( $selected_month, 0 ); ?> value='0'><?php _e('Show all dates'); ?></option>
    20842085<?php
    20852086foreach ($arc_result as $arc_row) {
     
    20882089    $arc_row->mmonth = zeroise( $arc_row->mmonth, 2 );
    20892090
    2090     if ( isset($_GET['m']) && ( $arc_row->yyear . $arc_row->mmonth == $_GET['m'] ) )
     2091    if ( $arc_row->yyear . $arc_row->mmonth == $selected_month )
    20912092        $default = ' selected="selected"';
    20922093    else
Note: See TracChangeset for help on using the changeset viewer.