Skip to content

Instantly share code, notes, and snippets.

@palaksoni
Created December 2, 2011 21:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save palaksoni/1424948 to your computer and use it in GitHub Desktop.
Save palaksoni/1424948 to your computer and use it in GitHub Desktop.
[diff] Wordpress - PHP 5.4 alpha2-dev - wp-includes/user.php and wp-includes/class-wp-admin-bar.php
Index: wp-includes/user.php
===================================================================
--- wp-includes/user.php (revision 18407)
+++ wp-includes/user.php (working copy)
@@ -657,6 +657,7 @@
if ( !is_multisite() ) {
$blog_id = get_current_blog_id();
$blogs = array();
+ $blogs[ $blog_id ] = (object) $blogs[ $blog_id ];
$blogs[ $blog_id ]->userblog_id = $blog_id;
$blogs[ $blog_id ]->blogname = get_option('blogname');
$blogs[ $blog_id ]->domain = '';
Index: wp-includes/class-wp-admin-bar.php
===================================================================
--- wp-includes/class-wp-admin-bar.php (revision 18407)
+++ wp-includes/class-wp-admin-bar.php (working copy)
@@ -164,6 +164,7 @@
function add_node( $parent_id, &$menu, $child ) {
foreach( $menu as $id => $menu_item ) {
if ( $parent_id == $id ) {
+ $menu->{$parent_id}['children'] = (object) $menu->{$parent_id}['children'];
$menu->{$parent_id}['children']->{$child['id']} = $child;
$child = null;
return true;
Index: wp-admin/includes/theme.php
===================================================================
--- wp-admin/includes/theme.php (revision 18407)
+++ wp-admin/includes/theme.php (working copy)
@@ -20,6 +20,7 @@
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'];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment