From c78ee4e2011b50232066e86ca651c93bea2606e1 Mon Sep 17 00:00:00 2001 From: AJ Quick Date: Sun, 15 Mar 2015 17:47:01 -0600 Subject: [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 --- phpBB/includes/startup.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'phpBB/includes/startup.php') 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')) -- cgit v1.2.1 From b5573bb92dc0b826a98bd7e092c59d801092704a Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Tue, 9 Jun 2015 21:22:52 +0200 Subject: [ticket/13923] CS PHPBB3-13923 --- phpBB/includes/startup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/includes/startup.php') diff --git a/phpBB/includes/startup.php b/phpBB/includes/startup.php index 2a25e6975b..7353b90d99 100644 --- a/phpBB/includes/startup.php +++ b/phpBB/includes/startup.php @@ -94,7 +94,7 @@ if (version_compare(PHP_VERSION, '5.4.0-dev', '>=')) } else { - if(get_magic_quotes_runtime()) + if (get_magic_quotes_runtime()) { // Deactivate @set_magic_quotes_runtime(0); -- cgit v1.2.1