note 74617 deleted from function.get-magic-quotes-gpc by colder
| From: | colder@php.net | Date: | Fri, 20 Apr 2007 13:57:52 +0000 |
| Subject: | note 74617 deleted from function.get-magic-quotes-gpc by colder | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-125614@lists.php.net to get a copy of this message | ||
Note Submitter: benjamin dot pongy at gmail dot com
----
thank you Hugo pour this precision.
how to be sure that GPC strings will be escaped?
<?php
if( in_array(ini_get('magic_quotes_gpc'), array('', '0',
'Off', 'False', 'No')) )
{
function addslashes_array($array)
{
return is_array($array) ? array_map('addslashes_array', $array) : addslashes($array);
}
$_GET = addslashes_array($_GET);
$_POST = addslashes_array($_POST);
$_COOKIE = addslashes_array($_COOKIE);
}