Xml: Fix Xml::fieldset() when $content is not given
authorBartosz Dziewoński <matma.rex@gmail.com>
Fri, 15 Sep 2017 18:06:45 +0000 (20:06 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Sat, 16 Sep 2017 13:23:08 +0000 (15:23 +0200)
A function in the Xml class could generate unbalanced tags. How
ironic. Why do we even have this instead of just the Html class?

Change-Id: Ie119c92aa4936e2f8982163d4b00d08949f49264

includes/Xml.php

index 0091513..eadc7d1 100644 (file)
@@ -615,9 +615,9 @@ class Xml {
 
                if ( $content !== false ) {
                        $s .= $content . "\n";
-                       $s .= self::closeElement( 'fieldset' ) . "\n";
                }
 
+               $s .= self::closeElement( 'fieldset' ) . "\n";
                return $s;
        }