Use the correct variable name; Simpler static initialisation. Props hakre. See #11613 & #16978

git-svn-id: https://develop.svn.wordpress.org/trunk@17566 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2011-03-28 09:55:15 +00:00
parent d400b19f92
commit 6901f20e9b

View File

@ -218,11 +218,9 @@ class WP_Http {
* @return array|object Array containing 'headers', 'body', 'response', 'cookies'. A WP_Error instance upon error
*/
private function _dispatch_request($url, $args) {
static $transports = null;
if ( is_null($transports) )
$transports = array();
static $transports = array();
$request_order = isset($r['blocking']) && !$r['blocking'] ?
$request_order = isset($args['blocking']) && !$args['blocking'] ?
array('curl', 'streams', 'fsockopen', 'exthttp') : // non-blocking order
array('exthttp', 'curl', 'streams', 'fsockopen'); // blocking order