[feature/auth-refactor] Fix the actual cause of test failures

Enables super globals before the new container is instantiated in
the final step of installation to prevent issues caused by trying
to create a phpbb_request object when super globals are disabled.

PHPBB3-9734
This commit is contained in:
Joseph Warner 2013-07-01 22:37:55 -04:00
parent 66118ea49e
commit f48effb001
2 changed files with 5 additions and 2 deletions

View file

@ -79,7 +79,7 @@ class phpbb_request implements phpbb_request_interface
// simulate request_order = GP // simulate request_order = GP
$this->original_request = $this->input[phpbb_request_interface::REQUEST]; $this->original_request = $this->input[phpbb_request_interface::REQUEST];
$this->input[phpbb_request_interface::REQUEST] = (array)$this->input[phpbb_request_interface::POST] + (array)$this->input[phpbb_request_interface::GET]; $this->input[phpbb_request_interface::REQUEST] = $this->input[phpbb_request_interface::POST] + $this->input[phpbb_request_interface::GET];
if ($disable_super_globals) if ($disable_super_globals)
{ {

View file

@ -53,7 +53,7 @@ class install_install extends module
function main($mode, $sub) function main($mode, $sub)
{ {
global $lang, $template, $language, $phpbb_root_path, $phpEx; global $lang, $template, $language, $phpbb_root_path, $phpEx;
global $phpbb_container, $cache, $phpbb_log; global $phpbb_container, $cache, $phpbb_log, $request;
switch ($sub) switch ($sub)
{ {
@ -102,6 +102,9 @@ class install_install extends module
break; break;
case 'final': case 'final':
// Enable super globals to prevent issues with the new phpbb_request object
$request->enable_super_globals();
// Create a normal container now // Create a normal container now
$phpbb_container = phpbb_create_default_container($phpbb_root_path, $phpEx); $phpbb_container = phpbb_create_default_container($phpbb_root_path, $phpEx);