WordPress.org

Make WordPress Core

Changeset 7712


Ignore:
Timestamp:
04/16/08 23:09:37 (6 years ago)
Author:
ryan
Message:

array_shift() error fixes from DD32. fixes #6499 for 2.5

Location:
branches/2.5
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/2.5/wp-admin/import/blogger.php

    r7072 r7712  
    771771 
    772772        if ( isset( $_REQUEST['blog'] ) ) { 
    773             $blog = is_array($_REQUEST['blog']) ? array_shift( array_keys( $_REQUEST['blog'] ) ) : $_REQUEST['blog']; 
     773            $blog = is_array($_REQUEST['blog']) ? array_shift( $keys = array_keys( $_REQUEST['blog'] ) ) : $_REQUEST['blog']; 
    774774            $blog = (int) $blog; 
    775775            $result = $this->import_blog( $blog ); 
  • branches/2.5/wp-admin/widgets.php

    r7362 r7712  
    1919} elseif ( is_array($wp_registered_sidebars) && !empty($wp_registered_sidebars) ) { 
    2020    // By default we look at the first defined sidebar 
    21     $sidebar = array_shift( array_keys($wp_registered_sidebars) ); 
     21    $sidebar = array_shift( $keys = array_keys($wp_registered_sidebars) ); 
    2222} else { 
    2323    // If no sidebars, die. 
  • branches/2.5/wp-includes/post.php

    r7695 r7712  
    24262426            $icon_files = array(); 
    24272427            while ( $dirs ) { 
    2428                 $dir = array_shift(array_keys($dirs)); 
     2428                $dir = array_shift($keys = array_keys($dirs)); 
    24292429                $uri = array_shift($dirs); 
    24302430                if ( $dh = opendir($dir) ) { 
Note: See TracChangeset for help on using the changeset viewer.