Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#33254 closed defect (bug) (fixed)

Access undefined $current_user in update_option_new_admin_email().

Reported by: toro_unit's profile Toro_Unit Owned by: ocean90's profile ocean90
Milestone: 4.3 Priority: low
Severity: trivial Version: 4.2
Component: Networks and Sites Keywords: has-patch commit
Focuses: multisite Cc:


in update_option_new_admin_email.

	$content = str_replace( '###USERNAME###', $current_user->user_login, $content );

But undefined value $current_user.

Attachments (1)

patch.diff (616 bytes) - added by Toro_Unit 9 years ago.

Download all attachments as: .zip

Change History (4)

9 years ago

#1 @ocean90
9 years ago

  • Keywords has-patch commit added
  • Milestone changed from Awaiting Review to 4.3
  • Priority changed from normal to low
  • Severity changed from normal to trivial
  • Version changed from trunk to 4.2

Thanks for your report and the patch. Introduced/missed in [31403].

#2 @dd32
9 years ago

+1 looks good to me.

I have a feeling the code was supposed to be using global $current_user originally, but I have no issue with using the helper method instead.

#3 @ocean90
9 years ago

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

In 33569:

Multisite mails: Initialize $current_user before accessing $current_user->user_login.

props Toro_Unit.
see #31217.
fixes #33254.

Note: See TracTickets for help on using tickets.