Merge "Fix common typos"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 8 Aug 2018 13:54:09 +0000 (13:54 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 8 Aug 2018 13:54:09 +0000 (13:54 +0000)
includes/htmlform/fields/HTMLButtonField.php

index 7f7f718..84719a7 100644 (file)
@@ -34,6 +34,11 @@ class HTMLButtonField extends HTMLFormField {
 
        public function __construct( $info ) {
                $info['nodata'] = true;
+
+               $this->setShowEmptyLabel( false );
+
+               parent::__construct( $info );
+
                if ( isset( $info['flags'] ) ) {
                        $this->mFlags = $info['flags'];
                }
@@ -55,10 +60,6 @@ class HTMLButtonField extends HTMLFormField {
                } elseif ( isset( $info['buttonlabel-raw'] ) ) {
                        $this->buttonLabel = $info['buttonlabel-raw'];
                }
-
-               $this->setShowEmptyLabel( false );
-
-               parent::__construct( $info );
        }
 
        public function getInputHTML( $value ) {