Skip navigation
Help

fix_gpc_magic

6 common.inc fix_gpc_magic()
7 common.inc fix_gpc_magic()

Fix double-escaping problems caused by "magic quotes" in some PHP installations.

1 call to fix_gpc_magic()

File

drupal/includes/common.inc, line 1056
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;
}