function fix_gpc_magic
fix_gpc_magic()
Fixes double-escaping caused by "magic quotes" in some PHP installations.
See also
File
- includes/common.inc, line 1199
- Common functions that many Drupal modules will need to reference.
Code
function fix_gpc_magic() { static $fixed = FALSE; if (!$fixed && ini_get('magic_quotes_gpc')) { array_walk($_GET, '_fix_gpc_magic'); array_walk($_POST, '_fix_gpc_magic'); array_walk($_COOKIE, '_fix_gpc_magic'); array_walk($_REQUEST, '_fix_gpc_magic'); array_walk($_FILES, '_fix_gpc_magic_files'); } $fixed = TRUE; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!common.inc/function/fix_gpc_magic/7.x