diff --git a/wp-admin/includes/theme.php b/wp-admin/includes/theme.php index 1600aa70b..f645d4408 100644 --- a/wp-admin/includes/theme.php +++ b/wp-admin/includes/theme.php @@ -20,6 +20,7 @@ function current_theme_info() { delete_option( 'current_theme' ); $current_theme = get_current_theme(); } + $ct = new stdClass; $ct->name = $current_theme; $ct->title = $themes[$current_theme]['Title']; $ct->version = $themes[$current_theme]['Version']; diff --git a/wp-includes/class-wp-admin-bar.php b/wp-includes/class-wp-admin-bar.php index af5a25c9c..02156c1b3 100644 --- a/wp-includes/class-wp-admin-bar.php +++ b/wp-includes/class-wp-admin-bar.php @@ -164,6 +164,8 @@ class WP_Admin_Bar { function add_node( $parent_id, &$menu, $child ) { foreach( $menu as $id => $menu_item ) { if ( $parent_id == $id ) { + if ( ! isset( $menu->{$parent_id}['children'] ) ) + $menu->{$parent_id}['children'] = new stdClass; $menu->{$parent_id}['children']->{$child['id']} = $child; $child = null; return true;