Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#16680 closed defect (bug) (fixed)

Undefined index notice when signing up for username in multisite

Reported by: jfarthing84 Owned by: ryan
Milestone: 3.2 Priority: normal
Severity: normal Version: 3.1
Component: Multisite Keywords: has-patch commit
Focuses: Cc:


The following notice is displayed when signing up for a multisite username only:

Notice: Undefined index: add_to_blog in D:\www\wordpress-3.1-multisite\wp-includes\ms-functions.php on line 1863

This is because there is no isset() check on the $meta array for the key of 'add_to_blog'.

Attachments (2)

ms-functions.php.diff (544 bytes) - added by jfarthing84 7 years ago.
16680.diff (557 bytes) - added by kawauso 7 years ago.
Being pedantic: !empty()

Download all attachments as: .zip

Change History (5)

7 years ago

Being pedantic: !empty()

#1 @boonebgorges
7 years ago

Bump. I was just about to submit this very patch.

#2 @nacin
7 years ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 3.2

empty looks correct over isset, as a blog ID of 0 is invalid.

#3 @ryan
7 years ago

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

In [17794]:

Check if empty to avoid noticed when signing up for username in multisite. Props jfarthing84, kawauso. fixes #16680

Note: See TracTickets for help on using tickets.