Make WordPress Core

Opened 15 years ago

Closed 15 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:
Priority: normal Milestone:
Component: Plugins Version: 3.2
Severity: normal Keywords: has-patch
Cc: Focuses:

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

Download all attachments as: .zip

Change History (3)

#1 @SergeyBiryukov
15 years ago

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

#2 @SergeyBiryukov
15 years ago

  • Milestone Awaiting Review
  • Resolution → duplicate
  • Status new → closed
Note: See TracTickets for help on using tickets.