From: Mark Holmquist Date: Tue, 14 Apr 2015 18:23:20 +0000 (-0700) Subject: UploadForm: Don't set a null context X-Git-Tag: 1.31.0-rc.0~11720 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=ef35666a0b45c5677abff6d8d0046af94d72419d;p=lhc%2Fweb%2Fwiklou.git UploadForm: Don't set a null context Breaking Special:Specialpages on master now. Bug: T96057 Change-Id: Ieb21b4d07af2dc8ea18016568c98b78e390ac2d5 --- diff --git a/includes/specials/SpecialUpload.php b/includes/specials/SpecialUpload.php index 8390feb083..3f1ea42626 100644 --- a/includes/specials/SpecialUpload.php +++ b/includes/specials/SpecialUpload.php @@ -787,7 +787,10 @@ class UploadForm extends HTMLForm { 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'] : '';