Another PHP weak typing bug: when section anchors are numeric, the string indexes...
authorAryeh Gregor <simetrical@users.mediawiki.org>
Thu, 12 Jun 2008 22:06:41 +0000 (22:06 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Thu, 12 Jun 2008 22:06:41 +0000 (22:06 +0000)
RELEASE-NOTES
includes/Parser.php

index 25eea69..cebf30f 100644 (file)
@@ -368,6 +368,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 14500) Site feed (Recentchanges) no longer shows up on the actual
   recent changes page.
 * (bug 14511) MediaWiki:Delete-legend is no longer double escaped
+* Generate correct section anchors for numeric headers
 
 === API changes in 1.13 ===
 
index d8540a0..4daa8f2 100644 (file)
@@ -3570,9 +3570,6 @@ class Parser
                        # HTML names must be case-insensitively unique (bug 10721)
                        $arrayKey = strtolower( $safeHeadline );
 
-                       # XXX : Is $refers[$headlineCount] ever accessed, actually ?
-                       $refers[$headlineCount] = $safeHeadline;
-
                        # count how many in assoc. array so we can track dupes in anchors
                        isset( $refers[$arrayKey] ) ? $refers[$arrayKey]++ : $refers[$arrayKey] = 1;
                        $refcount[$headlineCount] = $refers[$arrayKey];