Skip to content

Commit

Permalink
array_shift() error fixes from DD32. fixes #6499 for trunk
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.automattic.com/wordpress/trunk@7713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
ryan committed Apr 16, 2008
1 parent 7387154 commit 957a613
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion wp-admin/import/blogger.php
Expand Up @@ -770,7 +770,7 @@ function start() {
$this->$key = $value;

if ( isset( $_REQUEST['blog'] ) ) {
$blog = is_array($_REQUEST['blog']) ? array_shift( array_keys( $_REQUEST['blog'] ) ) : $_REQUEST['blog'];
$blog = is_array($_REQUEST['blog']) ? array_shift( $keys = array_keys( $_REQUEST['blog'] ) ) : $_REQUEST['blog'];
$blog = (int) $blog;
$result = $this->import_blog( $blog );
if ( is_wp_error( $result ) )
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/widgets.php
Expand Up @@ -18,7 +18,7 @@
$sidebar = attribute_escape( $_GET['sidebar'] );
} elseif ( is_array($wp_registered_sidebars) && !empty($wp_registered_sidebars) ) {
// By default we look at the first defined sidebar
$sidebar = array_shift( array_keys($wp_registered_sidebars) );
$sidebar = array_shift( $keys = array_keys($wp_registered_sidebars) );
} else {
// If no sidebars, die.
require_once( 'admin-header.php' );
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/post.php
Expand Up @@ -2425,7 +2425,7 @@ function wp_mime_type_icon( $mime = 0 ) {
$dirs = apply_filters( 'icon_dirs', array($icon_dir => $icon_dir_uri) );
$icon_files = array();
while ( $dirs ) {
$dir = array_shift(array_keys($dirs));
$dir = array_shift($keys = array_keys($dirs));
$uri = array_shift($dirs);
if ( $dh = opendir($dir) ) {
while ( false !== $file = readdir($dh) ) {
Expand Down

0 comments on commit 957a613

Please sign in to comment.