[wp-trac] Re: [WordPress Trac] #8620: Fatal error with HTTP class
WordPress Trac
wp-trac at lists.automattic.com
Mon May 25 23:12:17 GMT 2009
#8620: Fatal error with HTTP class
---------------------------+------------------------------------------------
Reporter: momo360modena | Owner: westi
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 2.8
Component: HTTP | Version: 2.7
Severity: major | Resolution: fixed
Keywords: has-patch |
---------------------------+------------------------------------------------
Changes (by dd32):
* status: reopened => closed
* resolution: => fixed
* milestone: 2.9 => 2.8
Comment:
> There is defenetly no need to have a is_wp_error() call inside the
functions. It will have no difference in the API to have them in or not.
It will only slow things down if you put them in
For code that is called once in a lifetime, A bit extra processing time is
OK.
Valid responses from upstream are an array, or WP_Error object. These
functions take the result from an upstream function, and return
information about it. Therefor, They need to handle WP_Error objects as
shown by the OP here, as not everyone is going to test for a error
condition first.
Your patches add absolutely -nothing- over the current implementation,
Infact, Casting to an array is a bandaid idea IMO. With keeping the
current wp_error checks, I see absolutely no way that your proposed
changes could speed it up at all, Testing variable type is faster than
casting it anyway.
I'm closing this as fixed. Feel free to attempt to sway minds, But as
you've seen above, No-one is interested in commiting it right now. Open a
new ticket for a future release if you see fit.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/8620#comment:34>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list