r102955 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102954‎ | r102955 | r102956 >
Date:09:23, 14 November 2011
Author:catrope
Status:ok
Tags:
Comment:
Revert r102949. Broke tests (undefined variable $_SESSION because session_start() hadn't been called) and is unnecessary because we have DerivativeRequest now
Modified paths:
  • /trunk/phase3/includes/WebRequest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/WebRequest.php
@@ -1179,7 +1179,7 @@
11801180 * @param $data Array of *non*-urlencoded key => value pairs, the
11811181 * fake GET/POST values
11821182 * @param $wasPosted Bool: whether to treat the data as POST
1183 - * @param $session Mixed: session array or null. If null, $_SESSION will be used
 1183+ * @param $session Mixed: session array or null
11841184 */
11851185 public function __construct( $data, $wasPosted = false, $session = null ) {
11861186 if( is_array( $data ) ) {
@@ -1188,11 +1188,8 @@
11891189 throw new MWException( "FauxRequest() got bogus data" );
11901190 }
11911191 $this->wasPosted = $wasPosted;
1192 - if( $session ) {
 1192+ if( $session )
11931193 $this->session = $session;
1194 - } else {
1195 - $this->session = $_SESSION;
1196 - }
11971194 }
11981195
11991196 /**

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r102949Followup r101149: make FauxRequest::__construct() use $_SESSION if the sessio...catrope08:40, 14 November 2011

Status & tagging log