r76503 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76502‎ | r76503 | r76504 >
Date:04:50, 11 November 2010
Author:mah
Status:reverted (Comments)
Tags:
Comment:
fixes Bug 25812
Modified paths:
  • /trunk/phase3/includes/upload/UploadStash.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/upload/UploadStash.php
@@ -44,10 +44,6 @@
4545
4646 $this->repo = $repo;
4747
48 - if ( ! isset( $_SESSION ) ) {
49 - throw new UploadStashNotAvailableException( 'no session variable' );
50 - }
51 -
5248 if ( !isset( $_SESSION[UploadBase::SESSION_KEYNAME] ) ) {
5349 $_SESSION[UploadBase::SESSION_KEYNAME] = array();
5450 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r76526* Revert r76503...mah17:52, 11 November 2010
r76797uploadwizard-deployment: Merge recent revs from trunk: r75995, r76354, r76386...catrope14:47, 16 November 2010

Comments

#Comment by MaxSem (talk | contribs)   05:54, 11 November 2010

Because you've removed the check for $_SESSION's existence, but use it below, this will still result in warnings.

#Comment by MarkAHershberger (talk | contribs)   16:07, 11 November 2010

Since the next use of $_SESSION is surrounded by isset(), no warning will result. Sample code below. However, I'll put the exception back in and catch it when the Special page tries to create this.

<?php

ini_set('error_reporting', E_ALL | E_STRICT);

if(!isset($i_am_not_defined[0])) echo "boo\n";

Status & tagging log