diff options
author | AJ Quick <ajquick@gmail.com> | 2015-03-15 17:47:01 -0600 |
---|---|---|
committer | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2015-06-06 13:05:34 +0200 |
commit | c78ee4e2011b50232066e86ca651c93bea2606e1 (patch) | |
tree | 5ff2223b415d0ec21d253624b40a76032139589c /phpBB/includes/startup.php | |
parent | 774582876cb00ff9858216aac74f74b1fb5ea818 (diff) | |
download | forums-c78ee4e2011b50232066e86ca651c93bea2606e1.tar forums-c78ee4e2011b50232066e86ca651c93bea2606e1.tar.gz forums-c78ee4e2011b50232066e86ca651c93bea2606e1.tar.bz2 forums-c78ee4e2011b50232066e86ca651c93bea2606e1.tar.xz forums-c78ee4e2011b50232066e86ca651c93bea2606e1.zip |
[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
Diffstat (limited to 'phpBB/includes/startup.php')
-rw-r--r-- | phpBB/includes/startup.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/phpBB/includes/startup.php b/phpBB/includes/startup.php index 2885c80541..2a25e6975b 100644 --- a/phpBB/includes/startup.php +++ b/phpBB/includes/startup.php @@ -94,7 +94,11 @@ if (version_compare(PHP_VERSION, '5.4.0-dev', '>=')) } else { - @set_magic_quotes_runtime(0); + 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')) |