From ef063f85080fce4c52ce2eef936c89fb52e0a7aa Mon Sep 17 00:00:00 2001 From: dd32 Date: Mon, 28 Mar 2011 09:55:15 +0000 Subject: [PATCH] Use the correct variable name; Simpler static initialisation. Props hakre. See #11613 & #16978 git-svn-id: http://svn.automattic.com/wordpress/trunk@17566 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-http.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/wp-includes/class-http.php b/wp-includes/class-http.php index 3f47fc4b9..924e350d3 100644 --- a/wp-includes/class-http.php +++ b/wp-includes/class-http.php @@ -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