jenkins-bot has submitted this change and it was merged.

Change subject: UploadForm: Don't set a null context
......................................................................


UploadForm: Don't set a null context

Breaking Special:Specialpages on master now.

Bug: T96057
Change-Id: Ieb21b4d07af2dc8ea18016568c98b78e390ac2d5
---
M includes/specials/SpecialUpload.php
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/specials/SpecialUpload.php 
b/includes/specials/SpecialUpload.php
index 8390feb..3f1ea42 100644
--- a/includes/specials/SpecialUpload.php
+++ b/includes/specials/SpecialUpload.php
@@ -787,7 +787,10 @@
        protected $mMaxUploadSize = array();
 
        public function __construct( array $options = array(), IContextSource 
$context = null ) {
-               $this->setContext( $context );
+               if ( $context instanceof IContextSource ) {
+                       $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/204089
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieb21b4d07af2dc8ea18016568c98b78e390ac2d5
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: MarkTraceur <[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

Reply via email to