From 204415325e35ad7ec91bb09820c3c3a20d8a02da Mon Sep 17 00:00:00 2001 From: Andrew Short Date: Tue, 16 Jun 2009 11:47:23 +0000 Subject: [PATCH] MINOR ajshort: Check that get_magic_quotes_gpc() is defined before calling it (was removed in PHP 6). From: Andrew Short git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79362 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/Core.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/Core.php b/core/Core.php index 242e20cc8..31bbca9ec 100755 --- a/core/Core.php +++ b/core/Core.php @@ -83,7 +83,7 @@ if(!isset($_SERVER['HTTP_HOST'])) { /** * Fix magic quotes setting */ - if (get_magic_quotes_gpc()) { + if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) { if($_REQUEST) stripslashes_recursively($_REQUEST); if($_GET) stripslashes_recursively($_GET); if($_POST) stripslashes_recursively($_POST);