array_shift() error fixes from DD32. fixes #6499 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@7713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -770,7 +770,7 @@ class Blogger_Import {
|
||||
$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 ) )
|
||||
|
||||
@@ -18,7 +18,7 @@ if ( isset($_GET['sidebar']) && isset($wp_registered_sidebars[$_GET['sidebar']])
|
||||
$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' );
|
||||
|
||||
Reference in New Issue
Block a user