WordPress.org

Make WordPress Core

Changeset 25226


Ignore:
Timestamp:
09/04/2013 05:10:43 AM (7 years ago)
Author:
SergeyBiryukov
Message:

Avoid 'Only variables should be passed by reference' notice on Widgets screen. props jdgrimes. fixes #25225.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/widgets.php

    r22812 r25226  
    183183    if ( isset($_GET['addnew']) ) {
    184184        // Default to the first sidebar
    185         $sidebar = array_shift( $keys = array_keys($wp_registered_sidebars) );
     185        $keys = array_keys( $wp_registered_sidebars );
     186        $sidebar = array_shift( $keys );
    186187
    187188        if ( isset($_GET['base']) && isset($_GET['num']) ) { // multi-widget
Note: See TracChangeset for help on using the changeset viewer.