From 8059fc875bd40798e2aa2d91412ed3f16aac893d Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Fri, 11 Apr 2008 19:03:38 +0000 Subject: [PATCH] (bug 13690) Fix PHP notice on accessing some URLs. parse_url() in some versions of PHP doesn't set the path element if it's empty, rather than actually returning it as an empty string. --- RELEASE-NOTES | 1 + includes/WebRequest.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index f244425da7..b2d022c6af 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -169,6 +169,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 13433) Fix action=render on Image: pages * (bug 13678) Fix CSS validation for Monobook * (bug 13684) Links in Special:ListGroupRights should be in content language +* (bug 13690) Fix PHP notice on accessing some URLs === API changes in 1.13 === diff --git a/includes/WebRequest.php b/includes/WebRequest.php index e2075c97e4..a65e722983 100644 --- a/includes/WebRequest.php +++ b/includes/WebRequest.php @@ -79,7 +79,7 @@ class WebRequest { } $a = parse_url( $url ); if( $a ) { - $path = $a['path']; + $path = isset( $a['path'] ) ? $a['path'] : ''; global $wgScript; if( $path == $wgScript ) { -- 2.20.1