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-includes/theme.php

    r24976 r25025  
    648648        return $matches[1] . "#$matches[2] onclick=$matches[2]return false;" . $matches[4];
    649649
    650     $link = add_query_arg( array( 'preview' => 1, 'template' => $_GET['template'], 'stylesheet' => @$_GET['stylesheet'], 'preview_iframe' => 1 ), $matches[3] );
     650    $stylesheet = isset( $_GET['stylesheet'] ) ? $_GET['stylesheet'] : '';
     651    $template   = isset( $_GET['template'] )   ? $_GET['template']   : '';
     652
     653    $link = add_query_arg( array( 'preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'preview_iframe' => 1 ), $matches[3] );
    651654    if ( 0 === strpos($link, 'preview=1') )
    652655        $link = "?$link";
Note: See TracChangeset for help on using the changeset viewer.