MINOR ajshort: Check that get_magic_quotes_gpc() is defined before calling it (was removed in PHP 6).

From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79362 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Andrew Short 2009-06-16 11:47:23 +00:00 committed by Sam Minnee
parent b7835f3721
commit 204415325e

View File

@ -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);