Omit useless value="" in Html::input()
authorAryeh Gregor <simetrical@users.mediawiki.org>
Fri, 21 Aug 2009 21:34:52 +0000 (21:34 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Fri, 21 Aug 2009 21:34:52 +0000 (21:34 +0000)
includes/Html.php

index 18d7390..075cb3b 100644 (file)
@@ -347,7 +347,7 @@ class Html {
                if ( $type != 'text' ) {
                        $attribs['type'] = $type;
                }
-               if ( $value !== null ) {
+               if ( $value !== null && $value !== '' ) {
                        $attribs['value'] = $value;
                }
                $attribs['name'] = $name;