aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjaviexin <javiexin@gmail.com>2017-05-12 23:04:54 +0200
committerjaviexin <javiexin@gmail.com>2017-05-12 23:04:54 +0200
commitc2c5c20c319d397948218b4c342fb146bf15040b (patch)
tree21aa271f6b06dff8b0e5ed50a2dae1146f6bf323
parentad5fcd535630b9a93333bb6e16bc84bff8f103ae (diff)
downloadforums-c2c5c20c319d397948218b4c342fb146bf15040b.tar
forums-c2c5c20c319d397948218b4c342fb146bf15040b.tar.gz
forums-c2c5c20c319d397948218b4c342fb146bf15040b.tar.bz2
forums-c2c5c20c319d397948218b4c342fb146bf15040b.tar.xz
forums-c2c5c20c319d397948218b4c342fb146bf15040b.zip
[ticket/15227] Check PHP version and remove old unused code
PHPBB3-15227
-rw-r--r--phpBB/common.php5
-rw-r--r--phpBB/includes/startup.php31
2 files changed, 10 insertions, 26 deletions
diff --git a/phpBB/common.php b/phpBB/common.php
index 70feb55d04..172503f078 100644
--- a/phpBB/common.php
+++ b/phpBB/common.php
@@ -20,11 +20,6 @@ if (!defined('IN_PHPBB'))
exit;
}
-if (version_compare(PHP_VERSION, '5.4') < 0)
-{
- die('You are running an unsupported PHP version. Please upgrade to PHP 5.4.0 or higher before trying to install or update to phpBB 3.2');
-}
-
require($phpbb_root_path . 'includes/startup.' . $phpEx);
require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx);
diff --git a/phpBB/includes/startup.php b/phpBB/includes/startup.php
index 5900016c39..327971fa8a 100644
--- a/phpBB/includes/startup.php
+++ b/phpBB/includes/startup.php
@@ -80,30 +80,19 @@ function deregister_globals()
unset($input);
}
-// Register globals and magic quotes have been dropped in PHP 5.4
-if (version_compare(PHP_VERSION, '5.4.0-dev', '>='))
+/**
+* Minimum Requirement: PHP 5.4.0
+*/
+if (version_compare(PHP_VERSION, '5.4') < 0)
{
- /**
- * @ignore
- */
- define('STRIP', false);
+ die('You are running an unsupported PHP version. Please upgrade to PHP 5.4.0 or higher before trying to install or update to phpBB 3.2');
}
-else
-{
- if (get_magic_quotes_runtime())
- {
- // Deactivate
- @set_magic_quotes_runtime(0);
- }
- // Be paranoid with passed vars
- if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on' || !function_exists('ini_get'))
- {
- deregister_globals();
- }
-
- define('STRIP', (get_magic_quotes_gpc()) ? true : false);
-}
+// Register globals and magic quotes have been dropped in PHP 5.4 so no need for extra checks
+/**
+* @ignore
+*/
+define('STRIP', false);
// In PHP 5.3.0 the error level has been raised to E_WARNING which causes problems
// because we show E_WARNING errors and do not set a default timezone.