Do not unslash variables reset by wp_reset_vars(). Remove variables that have never been used in plugin-editor.php. see #21767.

git-svn-id: https://develop.svn.wordpress.org/trunk@23419 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2013-02-15 02:01:36 +00:00
parent 2d34b9a876
commit 36d09ab2ef
2 changed files with 2 additions and 4 deletions

View File

@ -20,7 +20,7 @@ if ( !current_user_can('edit_plugins') )
$title = __("Edit Plugins");
$parent_file = 'plugins.php';
wp_reset_vars(array('action', 'redirect', 'profile', 'error', 'warning', 'a', 'file', 'plugin'));
wp_reset_vars( array( 'action', 'error', 'file', 'plugin' ) );
$plugins = get_plugins();
@ -39,8 +39,6 @@ $plugin_files = get_plugin_files($plugin);
if ( empty($file) )
$file = $plugin_files[0];
else
$file = wp_unslash($file);
$file = validate_file_to_edit($file, $plugin_files);
$real_file = WP_PLUGIN_DIR . '/' . $file;

View File

@ -68,7 +68,7 @@ if ( empty( $file ) ) {
$relative_file = 'style.css';
$file = $allowed_files['style.css'];
} else {
$relative_file = wp_unslash( $file );
$relative_file = $file;
$file = $theme->get_stylesheet_directory() . '/' . $relative_file;
}