From: Aryeh Gregor Date: Fri, 11 Apr 2008 19:03:38 +0000 (+0000) Subject: (bug 13690) Fix PHP notice on accessing some URLs. parse_url() in some versions... X-Git-Tag: 1.31.0-rc.0~48437 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=8059fc875bd40798e2aa2d91412ed3f16aac893d;p=lhc%2Fweb%2Fwiklou.git (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. --- 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 ) {