mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #4012 from tractorcow/pulls/3.2/deprecate-stripslashes
Deprecate stripslashes_recursively and magic quotes
This commit is contained in:
commit
4959f0eea8
@ -78,6 +78,7 @@ foreach ($dirsToCheck as $dir) {
|
|||||||
// GLOBALS AND DEFINE SETTING
|
// GLOBALS AND DEFINE SETTING
|
||||||
|
|
||||||
function stripslashes_recursively(&$array) {
|
function stripslashes_recursively(&$array) {
|
||||||
|
trigger_error('stripslashes_recursively is deprecated in 3.2', E_USER_DEPRECATED);
|
||||||
foreach($array as $k => $v) {
|
foreach($array as $k => $v) {
|
||||||
if(is_array($v)) stripslashes_recursively($array[$k]);
|
if(is_array($v)) stripslashes_recursively($array[$k]);
|
||||||
else $array[$k] = stripslashes($v);
|
else $array[$k] = stripslashes($v);
|
||||||
@ -140,7 +141,7 @@ if(!isset($_SERVER['HTTP_HOST'])) {
|
|||||||
if($_COOKIE) stripslashes_recursively($_COOKIE);
|
if($_COOKIE) stripslashes_recursively($_COOKIE);
|
||||||
// No more magic_quotes!
|
// No more magic_quotes!
|
||||||
trigger_error('get_magic_quotes_gpc support is being removed from Silverstripe. Please set this to off in ' .
|
trigger_error('get_magic_quotes_gpc support is being removed from Silverstripe. Please set this to off in ' .
|
||||||
' your php.ini and see http://php.net/manual/en/security.magicquotes.php', E_USER_WARNING);
|
' your php.ini and see http://php.net/manual/en/security.magicquotes.php', E_USER_DEPRECATED);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user