From: Kunal Mehta Date: Thu, 28 May 2015 06:02:58 +0000 (-0700) Subject: OOUIHTMLForm: Access context after parent constructor is called X-Git-Tag: 1.31.0-rc.0~11270 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/ajouter.php?a=commitdiff_plain;h=fbf72b866ca915332d93a4e20318fc03d1332b69;p=lhc%2Fweb%2Fwiklou.git 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 --- 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 ); } /**