X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FHtml.php;h=2ca52291b531229c51f05a7c88be9a5690df49ae;hb=285080c3116a1f99285d05e5bb1eab167ea89d6f;hp=019e0785f9dbab8fc06bf51734b99a5e00a6fd15;hpb=0eb1619898438735b04293b5aef9a36650258741;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Html.php b/includes/Html.php index 019e0785f9..2ca52291b5 100644 --- a/includes/Html.php +++ b/includes/Html.php @@ -391,8 +391,8 @@ class Html { unset( $attribs['type'] ); } if ( $element === 'input' ) { - $type = isset( $attribs['type'] ) ? $attribs['type'] : null; - $value = isset( $attribs['value'] ) ? $attribs['value'] : null; + $type = $attribs['type'] ?? null; + $value = $attribs['value'] ?? null; if ( $type === 'checkbox' || $type === 'radio' ) { // The default value for checkboxes and radio buttons is 'on' // not ''. By stripping value="" we break radio boxes that @@ -925,7 +925,7 @@ class Html { if ( isset( $params['label'] ) ) { $ret .= self::element( 'label', [ - 'for' => isset( $selectAttribs['id'] ) ? $selectAttribs['id'] : null, + 'for' => $selectAttribs['id'] ?? null, ], $params['label'] ) . ' '; }