Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#18372 closed defect (bug) (duplicate)

Undefined user object in pluggable.php throws php notices when debugging is turned on...

Reported by: MarcusPope Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.2
Component: Plugins Keywords: has-patch
Focuses: Cc:


wp-includes\pluggable.php lines 1337 & 786 attempt to access attributes on the $user object. When the $user object does not exist - as in xmlrpc requests - this throws a notice. When wordpress debug flag is on this appends warnings to output expected to be parseable by the consumer.

This may be a problem more properly fixed in the returned object of wp_get_current_user - some form of a generic stubbed user.

Attachments (1)

pluggable.php.patch (635 bytes) - added by MarcusPope 4 years ago.

Download all attachments as: .zip

Change History (3)

#1 @SergeyBiryukov
4 years ago

Looks like isset() will always return true. Wouldn't empty() be more appropriate?

#2 @SergeyBiryukov
4 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.