Follow-up 6f07389ef2eb: fix variable name
authorRoan Kattouw <roan.kattouw@gmail.com>
Thu, 4 Jan 2018 20:27:11 +0000 (21:27 +0100)
committerUmherirrender <umherirrender_de.wp@web.de>
Thu, 4 Jan 2018 21:31:41 +0000 (21:31 +0000)
Caused Notice: Undefined variable: text

Bug: T184123
Change-Id: I950a02134b145a2928af33995ca37a6965f265e4

includes/parser/Parser.php

index b871735..f41ee01 100644 (file)
@@ -5787,9 +5787,9 @@ class Parser {
                global $wgFragmentMode;
                if ( isset( $wgFragmentMode[1] ) && $wgFragmentMode[1] === 'legacy' ) {
                        // ForAttribute() and ForLink() are the same for legacy encoding
-                       $id = Sanitizer::escapeIdForAttribute( $text, Sanitizer::ID_FALLBACK );
+                       $id = Sanitizer::escapeIdForAttribute( $sectionName, Sanitizer::ID_FALLBACK );
                } else {
-                       $id = Sanitizer::escapeIdForLink( $text );
+                       $id = Sanitizer::escapeIdForLink( $sectionName );
                }
 
                return "#$id";