Merge "Fix EventRelayerKafka IDEA errors"
[lhc/web/wiklou.git] / includes / htmlform / VFormHTMLForm.php
index c446615..f3cba48 100644 (file)
@@ -137,9 +137,11 @@ class VFormHTMLForm extends HTMLForm {
                        $buttons .= Html::element( 'input', $attrs ) . "\n";
                }
 
-               $html = Html::rawElement( 'div',
-                       [ 'class' => 'mw-htmlform-submit-buttons' ], "\n$buttons" ) . "\n";
+               if ( !$buttons ) {
+                       return '';
+               }
 
-               return $html;
+               return Html::rawElement( 'div',
+                       [ 'class' => 'mw-htmlform-submit-buttons' ], "\n$buttons" ) . "\n";
        }
 }