GitInfo: Don't try shelling out if it's disabled
[lhc/web/wiklou.git] / includes / Html.php
index 019e078..0016426 100644 (file)
@@ -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,9 +925,9 @@ class Html {
                if ( isset( $params['label'] ) ) {
                        $ret .= self::element(
                                'label', [
-                                       'for' => isset( $selectAttribs['id'] ) ? $selectAttribs['id'] : null,
+                                       'for' => $selectAttribs['id'] ?? null,
                                ], $params['label']
-                       ) . ' ';
+                       ) . "\u{00A0}";
                }
 
                // Wrap options in a <select>