#24637 closed enhancement (fixed)
Correct inline docs for `is_wp_error()`
| Reported by: | johnbillion | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.6 |
| Component: | Inline Docs | Version: | 2.7 |
| Severity: | minor | Keywords: | has-patch |
| Cc: | Focuses: |
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)
Change History (4)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In 24507: