From 492d502295d7367fe61c4b00f58d5cfb542f0954 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 30 Jan 2008 23:44:26 +0000 Subject: [PATCH] Put the suppress & restore warnings calls *around* parse_url() rather than around an empty space after it. :) This avoids PHP warning notices when given not-quite-valid input, such as "http://en.wikipedia.org{{localurl:Talk:Wet_Tropics_of_Queensland/Comments|action=edit}}" --- includes/GlobalFunctions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 7237d74584..3b19ae4442 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -1946,8 +1946,8 @@ function wfRelativePath( $path, $from ) { */ function wfMakeUrlIndex( $url ) { global $wgUrlProtocols; // Allow all protocols defined in DefaultSettings/LocalSettings.php - $bits = parse_url( $url ); wfSuppressWarnings(); + $bits = parse_url( $url ); wfRestoreWarnings(); if ( !$bits ) { return false; -- 2.20.1