From: Prateek Saxena Date: Mon, 24 Jul 2017 18:37:14 +0000 (+0530) Subject: HTMLForm: Show more options when incorrect displayFormat is set X-Git-Tag: 1.31.0-rc.0~2579^2 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=d2b05e83e3a69009f9a1ec479fede3021d16299e;p=lhc%2Fweb%2Fwiklou.git HTMLForm: Show more options when incorrect displayFormat is set Change-Id: I47a4684f01f5e30629e819403d7445479c4607da --- diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php index 61d0d8962c..d4351e0304 100644 --- a/includes/htmlform/HTMLForm.php +++ b/includes/htmlform/HTMLForm.php @@ -400,7 +400,13 @@ class HTMLForm extends ContextSource { if ( !in_array( $format, $this->availableDisplayFormats, true ) ) { throw new MWException( 'Display format must be one of ' . - print_r( $this->availableDisplayFormats, true ) ); + print_r( + array_merge( + $this->availableDisplayFormats, + $this->availableSubclassDisplayFormats + ), + true + ) ); } // Evil hack for mobile :(