From edf60bcd550334a521f35700d52d800b1851d693 Mon Sep 17 00:00:00 2001 From: galaxyAbstractor Date: Sat, 14 Apr 2012 18:57:21 +0200 Subject: [ticket/10812] Disabled register_globals check in PHP 5.4 Disabled the check for register_globals if PHP version is 5.4+ PHPBB3-10812 --- phpBB/install/install_install.php | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) (limited to 'phpBB/install/install_install.php') diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 026fc0d404..454c8b4df0 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -166,25 +166,28 @@ class install_install extends module 'S_LEGEND' => false, )); - // Check for register_globals being enabled - if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on') + // Don't check for register_globals on 5.4+ + if (version_compare($php_version, '5.4.0-dev') < 0) { - $result = '' . $lang['NO'] . ''; - } - else - { - $result = '' . $lang['YES'] . ''; - } - - $template->assign_block_vars('checks', array( - 'TITLE' => $lang['PHP_REGISTER_GLOBALS'], - 'TITLE_EXPLAIN' => $lang['PHP_REGISTER_GLOBALS_EXPLAIN'], - 'RESULT' => $result, + // Check for register_globals being enabled + if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on') + { + $result = '' . $lang['NO'] . ''; + } + else + { + $result = '' . $lang['YES'] . ''; + } - 'S_EXPLAIN' => true, - 'S_LEGEND' => false, - )); + $template->assign_block_vars('checks', array( + 'TITLE' => $lang['PHP_REGISTER_GLOBALS'], + 'TITLE_EXPLAIN' => $lang['PHP_REGISTER_GLOBALS_EXPLAIN'], + 'RESULT' => $result, + 'S_EXPLAIN' => true, + 'S_LEGEND' => false, + )); + } // Check for url_fopen if (@ini_get('allow_url_fopen') == '1' || strtolower(@ini_get('allow_url_fopen')) == 'on') -- cgit v1.2.1