fix_gpc_magic

  1. drupal
    1. 4.7
    2. 5
    3. 6 common.inc
    4. 7 common.inc
Versions
4.7 – 7 fix_gpc_magic()

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

Code

includes/common.inc, line 542

<?php
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;
  }
}
?>