Merge "languages: Use "your" instead of "my" in the updatedmarker value"
[lhc/web/wiklou.git] / includes / htmlform / fields / HTMLInfoField.php
index a98f112..b4aab4a 100644 (file)
@@ -22,7 +22,7 @@ class HTMLInfoField extends HTMLFormField {
        public function getDefault() {
                $default = parent::getDefault();
                if ( $default instanceof Closure ) {
-                       $default = call_user_func( $default, $this->mParams );
+                       $default = $default( $this->mParams );
                }
                return $default;
        }
@@ -83,7 +83,8 @@ class HTMLInfoField extends HTMLFormField {
        public function getOOUI( $value ) {
                if ( !empty( $this->mParams['rawrow'] ) ) {
                        if ( !( $value instanceof OOUI\FieldLayout ) ) {
-                               throw new Exception( "'default' must be a FieldLayout or subclass when using 'rawrow'" );
+                               wfDeprecated( "'default' parameter as a string when using 'rawrow' " .
+                                       "(must be a FieldLayout or subclass)", '1.32' );
                        }
                        return $value;
                }