TemplatesOnThisPage: The second paramter in rawElement is attributes, not content
authorAmir Sarabadani <Ladsgroup@gmail.com>
Mon, 10 Oct 2016 18:37:36 +0000 (22:07 +0330)
committerLegoktm <legoktm.wikipedia@gmail.com>
Tue, 11 Oct 2016 03:13:25 +0000 (03:13 +0000)
With proper typehinting this wouldn't have happened

Bug: T147789
Change-Id: I19ef9388acfd9159304b8141c54ce1ead27d0791

includes/TemplatesOnThisPageFormatter.php

index c0ae374..494c7bf 100644 (file)
@@ -93,11 +93,11 @@ class TemplatesOnThisPageFormatter {
                }
 
                if ( $more instanceof LinkTarget ) {
-                       $outText .= Html::rawElement( 'li', $this->linkRenderer->makeLink(
+                       $outText .= Html::rawElement( 'li', [], $this->linkRenderer->makeLink(
                                $more, $this->context->msg( 'moredotdotdot' )->text() ) );
                } elseif ( $more ) {
                        // Documented as should already be escaped
-                       $outText .= Html::rawElement( 'li', $more );
+                       $outText .= Html::rawElement( 'li', [], $more );
                }
 
                $outText .= '</ul>';