Make WordPress Core

Changeset 25210


Ignore:
Timestamp:
09/02/2013 01:53:57 PM (11 years ago)
Author:
SergeyBiryukov
Message:

Avoid 'Only variables should be passed by reference' notice on plugin search. props daankortenbach. fixes #25217.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/plugin-install.php

    r24725 r25210  
    297297    }
    298298
    299     $section = isset($_REQUEST['section']) ? wp_unslash( $_REQUEST['section'] ) : 'description'; //Default to the Description tab, Do not translate, API returns English.
    300     if ( empty($section) || ! isset($api->sections[ $section ]) )
    301         $section = array_shift( $section_titles = array_keys((array)$api->sections) );
     299    $section = isset( $_REQUEST['section'] ) ? wp_unslash( $_REQUEST['section'] ) : 'description'; //Default to the Description tab, Do not translate, API returns English.
     300    if ( empty( $section ) || ! isset( $api->sections[ $section ] ) ) {
     301        $section_titles = array_keys( (array) $api->sections );
     302        $section = array_shift( $section_titles );
     303    }
    302304
    303305    iframe_header( __('Plugin Install') );
Note: See TracChangeset for help on using the changeset viewer.