From fbf72b866ca915332d93a4e20318fc03d1332b69 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Wed, 27 May 2015 23:02:58 -0700 Subject: [PATCH] OOUIHTMLForm: Access context after parent constructor is called This avoids "ContextSource::getContext (OOUIHTMLForm): called and $context is null. Using RequestContext::getMain() for sanity" Change-Id: I20c2bb58b3a0e5e259241a3715ee8fdf4b57e148 --- includes/htmlform/OOUIHTMLForm.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/htmlform/OOUIHTMLForm.php b/includes/htmlform/OOUIHTMLForm.php index 60e6366004..6c9952a07f 100644 --- a/includes/htmlform/OOUIHTMLForm.php +++ b/includes/htmlform/OOUIHTMLForm.php @@ -32,10 +32,10 @@ class OOUIHTMLForm extends HTMLForm { protected $mWrapperLegend = false; public function __construct( $descriptor, $context = null, $messagePrefix = '' ) { + parent::__construct( $descriptor, $context, $messagePrefix ); $this->getOutput()->enableOOUI(); $this->getOutput()->addModules( 'mediawiki.htmlform.ooui' ); $this->getOutput()->addModuleStyles( 'mediawiki.htmlform.ooui.styles' ); - parent::__construct( $descriptor, $context, $messagePrefix ); } /** -- 2.20.1