From: Thiemo Mättig Date: Thu, 26 Mar 2015 09:43:01 +0000 (+0100) Subject: Fix misleading $class = false default in Html::infoBox X-Git-Tag: 1.31.0-rc.0~11989^2 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/voir.php?a=commitdiff_plain;h=7ff53f8e07b03189a00d951bef8c277bb467b7eb;p=lhc%2Fweb%2Fwiklou.git Fix misleading $class = false default in Html::infoBox I found this because my PHPStorm complains about the type mismatch. I could have changed the @param tag to "string|bool", but when looking at the code, the $class variable is casted to a string anyway and never used as a bool. Change-Id: I3450fa8a898923bbae26830ed3be0017685020d3 --- diff --git a/includes/Html.php b/includes/Html.php index c172ae0488..6bd661fae7 100644 --- a/includes/Html.php +++ b/includes/Html.php @@ -997,7 +997,7 @@ class Html { * * @return string */ - static function infoBox( $text, $icon, $alt, $class = false ) { + static function infoBox( $text, $icon, $alt, $class = '' ) { $s = Html::openElement( 'div', array( 'class' => "mw-infobox $class" ) ); $s .= Html::openElement( 'div', array( 'class' => 'mw-infobox-left' ) ) .