Index: trunk/phase3/includes/WebRequest.php |
— | — | @@ -1179,7 +1179,7 @@ |
1180 | 1180 | * @param $data Array of *non*-urlencoded key => value pairs, the |
1181 | 1181 | * fake GET/POST values |
1182 | 1182 | * @param $wasPosted Bool: whether to treat the data as POST |
1183 | | - * @param $session Mixed: session array or null |
| 1183 | + * @param $session Mixed: session array or null. If null, $_SESSION will be used |
1184 | 1184 | */ |
1185 | 1185 | public function __construct( $data, $wasPosted = false, $session = null ) { |
1186 | 1186 | if( is_array( $data ) ) { |
— | — | @@ -1188,8 +1188,11 @@ |
1189 | 1189 | throw new MWException( "FauxRequest() got bogus data" ); |
1190 | 1190 | } |
1191 | 1191 | $this->wasPosted = $wasPosted; |
1192 | | - if( $session ) |
| 1192 | + if( $session ) { |
1193 | 1193 | $this->session = $session; |
| 1194 | + } else { |
| 1195 | + $this->session = $_SESSION; |
| 1196 | + } |
1194 | 1197 | } |
1195 | 1198 | |
1196 | 1199 | /** |