Caused Notice: Undefined variable: text
Bug: T184123
Change-Id: I950a02134b145a2928af33995ca37a6965f265e4
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";