From 6b08bd2708838b1d1449150d83907cb8158352df Mon Sep 17 00:00:00 2001 From: Rob Church Date: Wed, 12 Apr 2006 03:40:45 +0000 Subject: [PATCH] (bug 5510) Warning produced when using {{SUBPAGENAME}} in some namespaces --- RELEASE-NOTES | 1 + includes/Title.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index c5454d8938..221acb77c8 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -51,6 +51,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Replace "doubleredirectsarrow" with a content language check that picks the appropriate arrow * (bug 5537) Add stub language file for Samogitian (bat-smg); inherits Lithuanian (lt) * Don't force edit summaries when a user is editing their own user/talk page +* (bug 5510) Warning produced when using {{SUBPAGENAME}} in some namespaces == Compatibility == diff --git a/includes/Title.php b/includes/Title.php index b32d8ccd7a..c0561ac7aa 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -680,7 +680,7 @@ class Title { */ function getSubpageText() { global $wgNamespacesWithSubpages; - if( $wgNamespacesWithSubpages[ $this->mNamespace ] ) { + if( isset( $wgNamespacesWithSubpages[ $this->mNamespace ] ) && $wgNamespacesWithSubpages[ $this->mNamespace ] ) { $parts = explode( '/', $this->mTextform ); return( $parts[ count( $parts ) - 1 ] ); } else { -- 2.20.1