Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#13012 closed defect (bug) (fixed)

Editing users as super admin causes php error in ms.php

Reported by: phlux0r's profile phlux0r Owned by:
Milestone: 3.0 Priority: normal
Severity: normal Version:
Component: Users Keywords:
Focuses: Cc:

Description

WP 3.0 beta-1 rev 14041

When editing a user as Super Admin, clicking update produces php error (invalid argument in foreach...).

After that, super admin setting in site options is corrupted and all multisite features disappear. Temporary fix is to restore correct site_admin option in wp_sitemeta.

Looking at code on 837 in wp-admin/includes/ms.php, it tries to iterate over an array that has not been loaded. Fix is to add:

$super_admins = get_site_option( 'site_admins', array( 'admin' ) );

before foreach(). See included patch.

HTH

Attachments (1)

ms.php.patch (494 bytes) - added by phlux0r 15 years ago.
patch fo wp-admin/includes/ms.php

Download all attachments as: .zip

Change History (3)

@phlux0r
15 years ago

patch fo wp-admin/includes/ms.php

#1 @phlux0r
15 years ago

  • Cc phlux0r added

#2 @nacin
15 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in [14042]. Please svn up or download the latest nightly when reporting bugs on trunk.

Note: See TracTickets for help on using tickets.