mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 12:28:52 +00:00
[ticket/15227] Check PHP version and remove old unused code
PHPBB3-15227
This commit is contained in:
parent
ad5fcd5356
commit
c2c5c20c31
2 changed files with 10 additions and 26 deletions
|
@ -20,11 +20,6 @@ if (!defined('IN_PHPBB'))
|
||||||
exit;
|
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 . 'includes/startup.' . $phpEx);
|
||||||
require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx);
|
require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx);
|
||||||
|
|
||||||
|
|
|
@ -80,30 +80,19 @@ function deregister_globals()
|
||||||
unset($input);
|
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)
|
||||||
{
|
{
|
||||||
/**
|
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');
|
||||||
* @ignore
|
|
||||||
*/
|
|
||||||
define('STRIP', false);
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
if (get_magic_quotes_runtime())
|
|
||||||
{
|
|
||||||
// Deactivate
|
|
||||||
@set_magic_quotes_runtime(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Be paranoid with passed vars
|
// Register globals and magic quotes have been dropped in PHP 5.4 so no need for extra checks
|
||||||
if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on' || !function_exists('ini_get'))
|
/**
|
||||||
{
|
* @ignore
|
||||||
deregister_globals();
|
*/
|
||||||
}
|
define('STRIP', false);
|
||||||
|
|
||||||
define('STRIP', (get_magic_quotes_gpc()) ? true : false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// In PHP 5.3.0 the error level has been raised to E_WARNING which causes problems
|
// 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.
|
// because we show E_WARNING errors and do not set a default timezone.
|
||||||
|
|
Loading…
Add table
Reference in a new issue