WordPress.org

Make WordPress Core

Changeset 7713


Ignore:
Timestamp:
04/16/2008 11:09:51 PM (10 years ago)
Author:
ryan
Message:

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

Location:
trunk
Files:
3 edited

Legend:

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

    r7645 r7713  
    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 );
  • trunk/wp-admin/widgets.php

    r7362 r7713  
    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.
  • trunk/wp-includes/post.php

    r7694 r7713  
    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.