GitInfo: Don't try shelling out if it's disabled
[lhc/web/wiklou.git] / includes / htmlform / fields / HTMLTextField.php
index 1c5a43d..b51182a 100644 (file)
@@ -31,18 +31,18 @@ class HTMLTextField extends HTMLFormField {
                parent::__construct( $params );
 
                if ( isset( $params['placeholder-message'] ) ) {
-                       $this->mPlaceholder = $this->getMessage( $params['placeholder-message'] )->parse();
+                       $this->mPlaceholder = $this->getMessage( $params['placeholder-message'] )->text();
                } elseif ( isset( $params['placeholder'] ) ) {
                        $this->mPlaceholder = $params['placeholder'];
                }
        }
 
        public function getSize() {
-               return isset( $this->mParams['size'] ) ? $this->mParams['size'] : 45;
+               return $this->mParams['size'] ?? 45;
        }
 
        public function getSpellCheck() {
-               $val = isset( $this->mParams['spellcheck'] ) ? $this->mParams['spellcheck'] : null;
+               $val = $this->mParams['spellcheck'] ?? null;
                if ( is_bool( $val ) ) {
                        // "spellcheck" attribute literally requires "true" or "false" to work.
                        return $val === true ? 'true' : 'false';
@@ -107,7 +107,7 @@ class HTMLTextField extends HTMLFormField {
        }
 
        protected function getType( &$attribs ) {
-               $type = isset( $attribs['type'] ) ? $attribs['type'] : 'text';
+               $type = $attribs['type'] ?? 'text';
                unset( $attribs['type'] );
 
                # Implement tiny differences between some field variants