From 1c9c0e4911780998719425a7a20ddade14f10536 Mon Sep 17 00:00:00 2001 From: Gilles Dubuc Date: Mon, 2 Mar 2015 20:25:29 +0100 Subject: [PATCH] $timeout was optional in Http::get() Change-Id: I6cd2918412395d1d5f811f0d47bb080f22b598ec --- includes/HttpFunctions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php index 7f0d6a2160..3728cdf9f4 100644 --- a/includes/HttpFunctions.php +++ b/includes/HttpFunctions.php @@ -91,7 +91,7 @@ class Http { */ public static function get( $url, $options = array() ) { $args = func_get_args(); - if ( is_string( $args[1] ) || is_numeric( $args[1] ) ) { + if ( isset( $args[1] ) && ( is_string( $args[1] ) || is_numeric( $args[1] ) ) ) { // Second was used to be the timeout // And third parameter used to be $options wfWarn( "Second parameter should not be a timeout." ); -- 2.20.1