From 89aed6d7e85275c74ffdcc68dbf7612439a2068a Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 2 Sep 2013 13:54:10 +0000 Subject: [PATCH] Avoid 'Only variables should be passed by reference' notice on plugin search. props daankortenbach. fixes #25217. Built from https://develop.svn.wordpress.org/trunk@25210 git-svn-id: http://core.svn.wordpress.org/trunk@25182 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/plugin-install.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/wp-admin/includes/plugin-install.php b/wp-admin/includes/plugin-install.php index 1c07b6856c..f1451ddd6b 100644 --- a/wp-admin/includes/plugin-install.php +++ b/wp-admin/includes/plugin-install.php @@ -296,9 +296,11 @@ function install_plugin_information() { $api->$key = wp_kses( $api->$key, $plugins_allowedtags ); } - $section = isset($_REQUEST['section']) ? wp_unslash( $_REQUEST['section'] ) : 'description'; //Default to the Description tab, Do not translate, API returns English. - if ( empty($section) || ! isset($api->sections[ $section ]) ) - $section = array_shift( $section_titles = array_keys((array)$api->sections) ); + $section = isset( $_REQUEST['section'] ) ? wp_unslash( $_REQUEST['section'] ) : 'description'; //Default to the Description tab, Do not translate, API returns English. + if ( empty( $section ) || ! isset( $api->sections[ $section ] ) ) { + $section_titles = array_keys( (array) $api->sections ); + $section = array_shift( $section_titles ); + } iframe_header( __('Plugin Install') ); echo "
\n";