Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#24637 closed enhancement (fixed)

Correct inline docs for `is_wp_error()`

Reported by: johnbillion's profile johnbillion Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 3.6 Priority: normal
Severity: minor Version: 2.7
Component: Inline Docs Keywords: has-patch
Focuses: Cc:

Description

The inline docs for is_wp_error() states:

Does not check to see if the parent is also WP_Error, so can't inherit WP_Error and still use this function.

This is incorrect. is_wp_error() will return the expected result when passed an object of a class which extends WP_Error because it uses is_a() internally. From the `is_a()` man page:

Checks if the object is of this class or has this class as one of its parents.

Introduced in r8900.

Attachments (1)

24637.patch (793 bytes) - added by johnbillion 10 years ago.

Download all attachments as: .zip

Change History (4)

@johnbillion
10 years ago

#1 @johnbillion
10 years ago

  • Keywords has-patch added

#2 @SergeyBiryukov
10 years ago

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

In 24507:

Correct inline docs for is_wp_error(). props johnbillion. fixes #24637.

#3 @SergeyBiryukov
10 years ago

  • Milestone changed from Awaiting Review to 3.6
Note: See TracTickets for help on using tickets.