WordPress.org

Make WordPress Core

Changeset 8629


Ignore:
Timestamp:
08/12/2008 09:13:25 PM (11 years ago)
Author:
ryan
Message:

Quote array indexes. Props wet. fixes #7502

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/theme.php

    r8624 r8629  
    506506        return;
    507507
    508     $_GET[template] = preg_replace('|[^a-z0-9_.-]|i', '', $_GET[template]);
    509 
    510     if ( validate_file($_GET[template]) )
     508    $_GET['template'] = preg_replace('|[^a-z0-9_.-]|i', '', $_GET['template']);
     509
     510    if ( validate_file($_GET['template']) )
    511511        return;
    512512
    513     add_filter('template', create_function('', "return '$_GET[template]';") );
     513    add_filter('template', create_function('', "return '{$_GET['template']}';") );
    514514
    515515    if ( isset($_GET['stylesheet']) ) {
    516         $_GET[stylesheet] = preg_replace('|[^a-z0-9_.-]|i', '', $_GET[stylesheet]);
    517         if ( validate_file($_GET[stylesheet]) )
     516        $_GET['stylesheet'] = preg_replace('|[^a-z0-9_.-]|i', '', $_GET['stylesheet']);
     517        if ( validate_file($_GET['stylesheet']) )
    518518            return;
    519         add_filter('stylesheet', create_function('', "return '$_GET[stylesheet]';") );
     519        add_filter('stylesheet', create_function('', "return '{$_GET['stylesheet']}';") );
    520520    }
    521521
Note: See TracChangeset for help on using the changeset viewer.