From b5ff4ffe8fe5e79e110a71c61a625e2613fe7def Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Thu, 6 Dec 2007 22:16:47 +0000 Subject: [PATCH] * (bug 10166) Fix a PHP warning in Language::getMagic Patch by Nate Lallouche --- RELEASE-NOTES | 1 + languages/Language.php | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index f29aaed8cc..f07a5cf235 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -225,6 +225,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN to 'stderr' at runtime. * (bug 12148) Text highlight wasn't applied to cleanly deleted and added lines in diff output +* (bug 10166) Fix a PHP warning in Language::getMagic == Parser changes in 1.12 == diff --git a/languages/Language.php b/languages/Language.php index 9cbe943033..5d862b4ffd 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -1532,9 +1532,10 @@ class Language { if( !is_array( $rawEntry ) ) { error_log( "\"$rawEntry\" is not a valid magic thingie for \"$mw->mId\"" ); + } else { + $mw->mCaseSensitive = $rawEntry[0]; + $mw->mSynonyms = array_slice( $rawEntry, 1 ); } - $mw->mCaseSensitive = $rawEntry[0]; - $mw->mSynonyms = array_slice( $rawEntry, 1 ); } /** -- 2.20.1