function _fix_gpc_magic

Strips slashes from a string or array of strings.

Callback for array_walk() within fix_gpx_magic().

Parameters

$item: An individual string or array of strings from superglobals.

1 string reference to '_fix_gpc_magic'
fix_gpc_magic in includes/common.inc
Fixes double-escaping caused by "magic quotes" in some PHP installations.

File

includes/common.inc, line 1217

Code

function _fix_gpc_magic(&$item) {
    if (is_array($item)) {
        array_walk($item, '_fix_gpc_magic');
    }
    else {
        $item = stripslashes($item);
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.