From 95e6386122a8326c88e29a4cbe233720084327a6 Mon Sep 17 00:00:00 2001 From: Daniel Friesen Date: Sat, 5 Feb 2011 20:28:04 +0000 Subject: [PATCH] Html::expandAttributes( array( 'foo' => null ) ); ' foo=""' -> '' Outputting ' foo="" on `foo = null` promotes the writing of overly verbose code to avoid it, and ugly methods like our old Linker::getLinkAttributesInternal, both of which are completely counter to the purpose of Html::. --- includes/Html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Html.php b/includes/Html.php index 2e3466084d..4e6e611433 100644 --- a/includes/Html.php +++ b/includes/Html.php @@ -352,7 +352,7 @@ class Html { $ret = ''; $attribs = (array)$attribs; foreach ( $attribs as $key => $value ) { - if ( $value === false ) { + if ( $value === false || is_null( $value ) ) { continue; } -- 2.20.1