jenkins-bot has submitted this change and it was merged.
Change subject: Set context earlier in UploadForm::__construct
......................................................................
Set context earlier in UploadForm::__construct
The parent constructor sets the $context for the form, but
getSourceSection is using getUser before the call, which results in a
warning for using RequestContext::getMain().
Just set the context before use.
Change-Id: I88af41b22cf05ce18d3d2852325bc97cd2544556
---
M includes/specials/SpecialUpload.php
1 file changed, 1 insertion(+), 0 deletions(-)
Approvals:
Legoktm: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/specials/SpecialUpload.php
b/includes/specials/SpecialUpload.php
index 6f9254b..8390feb 100644
--- a/includes/specials/SpecialUpload.php
+++ b/includes/specials/SpecialUpload.php
@@ -787,6 +787,7 @@
protected $mMaxUploadSize = array();
public function __construct( array $options = array(), IContextSource
$context = null ) {
+ $this->setContext( $context );
$this->mWatch = !empty( $options['watch'] );
$this->mForReUpload = !empty( $options['forreupload'] );
$this->mSessionKey = isset( $options['sessionkey'] ) ?
$options['sessionkey'] : '';
--
To view, visit https://gerrit.wikimedia.org/r/203001
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I88af41b22cf05ce18d3d2852325bc97cd2544556
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits