WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 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:

Description

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 3 years ago.
16680.diff (557 bytes) - added by kawauso 3 years ago.
Being pedantic: !empty()

Download all attachments as: .zip

Change History (5)

kawauso3 years ago

Being pedantic: !empty()

comment:1 boonebgorges3 years ago

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

comment:2 nacin3 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.

comment:3 ryan3 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.