[wp-trac] [WordPress Trac] #24637: Correct inline docs for `is_wp_error()`

WordPress Trac noreply at wordpress.org
Mon Jun 24 15:53:22 UTC 2013


#24637: Correct inline docs for `is_wp_error()`
-------------------------+-----------------------------
 Reporter:  johnbillion  |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Inline Docs  |    Version:  2.7
 Severity:  minor        |   Keywords:
-------------------------+-----------------------------
 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 [http://php.net/manual/en/function.is-a.php
 `is_a()` man page]:
 > Checks if the object is of this class or has this class as one of its
 parents.
 Introduced in r8900.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24637>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list