Permalink
Browse files

Clear the `site_admins` network option before filling it

During initial installation, it's possible for the `site_admins`
meta key to be left blank and for a new meta key/value store to
be created after that one is misread. We should delete this option
during installation before recreating it with the current user
performing the install.
  • Loading branch information...
1 parent 41db0b2 commit 890ec11f9d4447911cec2c131749b3019868b65c @jeremyfelt jeremyfelt committed Oct 10, 2015
Showing with 3 additions and 1 deletion.
  1. +3 −1 install.php
View
@@ -34,7 +34,9 @@ function wp_install( $blog_title, $user_name, $user_email, $public, $deprecated
install_network();
populate_network( 1, $domain, $user_email, 'jQuery Network', $base, false );
- update_site_option( 'site_admins', array( $user->user_login ) );
+ delete_site_option( 'site_admins' );
+ add_site_option( 'site_admins', array( $user->user_login ) );
+
update_site_option( 'allowedthemes', array() );
$wpdb->insert( $wpdb->blogs, array( 'site_id' => 1, 'domain' => $domain, 'path' => $base, 'registered' => current_time( 'mysql' ) ) );

0 comments on commit 890ec11

Please sign in to comment.