Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#18372 closed defect (bug) (duplicate)

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

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

Description

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 14 years ago.

Download all attachments as: .zip

Change History (3)

#1 @SergeyBiryukov
14 years ago

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

#2 @SergeyBiryukov
14 years ago

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