From d2b05e83e3a69009f9a1ec479fede3021d16299e Mon Sep 17 00:00:00 2001 From: Prateek Saxena Date: Tue, 25 Jul 2017 00:07:14 +0530 Subject: [PATCH] HTMLForm: Show more options when incorrect displayFormat is set Change-Id: I47a4684f01f5e30629e819403d7445479c4607da --- includes/htmlform/HTMLForm.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 :( -- 2.20.1