From 9ebf26b2360ba9c7dcca1189f8814ebf09061fa6 Mon Sep 17 00:00:00 2001 From: Huji Date: Thu, 17 Jul 2008 20:02:16 +0000 Subject: [PATCH] (bug 14845) Bug in prefs javascript --- RELEASE-NOTES | 2 ++ skins/common/prefs.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 6db1ed51e4..420e5baf53 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -435,6 +435,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 10837) Language variants no longer override other languages than base * (bug 14778) 'limit' parameter now applies to history feeds as well as history pages +* (bug 14845) Bug in prefs javascript: Calling an array item without checking + its existance. === API changes in 1.13 === diff --git a/skins/common/prefs.js b/skins/common/prefs.js index a6b3337515..d9a612f90a 100644 --- a/skins/common/prefs.js +++ b/skins/common/prefs.js @@ -23,7 +23,7 @@ function tabbedprefs() { } var legends = children[i].getElementsByTagName('legend'); sections[seci] = {}; - legends[0].className = 'mainLegend'; + if (legends[0]) legends[0].className = 'mainLegend'; if (legends[0] && legends[0].firstChild.nodeValue) { sections[seci].text = legends[0].firstChild.nodeValue; } else { -- 2.20.1