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

git-svn-id: https://develop.svn.wordpress.org/trunk@25025 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse
2013-08-15 06:05:54 +00:00
parent 51c3faba5d
commit b971127bac
3 changed files with 12 additions and 7 deletions
+4 -1
View File
@@ -647,7 +647,10 @@ function preview_theme_ob_filter_callback( $matches ) {
)
return $matches[1] . "#$matches[2] onclick=$matches[2]return false;" . $matches[4];
$link = add_query_arg( array( 'preview' => 1, 'template' => $_GET['template'], 'stylesheet' => @$_GET['stylesheet'], 'preview_iframe' => 1 ), $matches[3] );
$stylesheet = isset( $_GET['stylesheet'] ) ? $_GET['stylesheet'] : '';
$template = isset( $_GET['template'] ) ? $_GET['template'] : '';
$link = add_query_arg( array( 'preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'preview_iframe' => 1 ), $matches[3] );
if ( 0 === strpos($link, 'preview=1') )
$link = "?$link";
return $matches[1] . esc_attr( $link ) . $matches[4];