(bug 14845) Bug in prefs javascript
authorHuji <huji@users.mediawiki.org>
Thu, 17 Jul 2008 20:02:16 +0000 (20:02 +0000)
committerHuji <huji@users.mediawiki.org>
Thu, 17 Jul 2008 20:02:16 +0000 (20:02 +0000)
RELEASE-NOTES
skins/common/prefs.js

index 6db1ed5..420e5ba 100644 (file)
@@ -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 ===
 
index a6b3337..d9a612f 100644 (file)
@@ -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 {