[ticket/13923] Update startup.php

While suppressing the output from the 'set_magic_quotes_runtime(0)'
is sufficient with normal phpBB installs, using this file in association
with the oauth plugin will cause an error on some versions of PHP.
This fixes a potential bug where set_magic_quotes_runtime is depreciated
in newer versions of PHP.

PHPBB3-13923
This commit is contained in:
AJ Quick 2015-03-15 17:47:01 -06:00 committed by Tristan Darricau
parent 774582876c
commit c78ee4e201

View file

@ -94,7 +94,11 @@ if (version_compare(PHP_VERSION, '5.4.0-dev', '>='))
} }
else else
{ {
if(get_magic_quotes_runtime())
{
// Deactivate
@set_magic_quotes_runtime(0); @set_magic_quotes_runtime(0);
}
// Be paranoid with passed vars // Be paranoid with passed vars
if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on' || !function_exists('ini_get')) if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on' || !function_exists('ini_get'))