From: Roan Kattouw Date: Mon, 14 Nov 2011 08:40:06 +0000 (+0000) Subject: Followup r101149: make FauxRequest::__construct() use $_SESSION if the session parame... X-Git-Tag: 1.31.0-rc.0~26524 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=eca300daffdf8d4be8c906bf41792d0d09af576f;p=lhc%2Fweb%2Fwiklou.git Followup r101149: make FauxRequest::__construct() use $_SESSION if the session parameter isn't given --- diff --git a/includes/WebRequest.php b/includes/WebRequest.php index d0430b926a..570a53d3fe 100644 --- a/includes/WebRequest.php +++ b/includes/WebRequest.php @@ -1179,7 +1179,7 @@ class FauxRequest extends WebRequest { * @param $data Array of *non*-urlencoded key => value pairs, the * fake GET/POST values * @param $wasPosted Bool: whether to treat the data as POST - * @param $session Mixed: session array or null + * @param $session Mixed: session array or null. If null, $_SESSION will be used */ public function __construct( $data, $wasPosted = false, $session = null ) { if( is_array( $data ) ) { @@ -1188,8 +1188,11 @@ class FauxRequest extends WebRequest { throw new MWException( "FauxRequest() got bogus data" ); } $this->wasPosted = $wasPosted; - if( $session ) + if( $session ) { $this->session = $session; + } else { + $this->session = $_SESSION; + } } /**