function _fix_gpc_magic

_fix_gpc_magic(&$item)

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.

File

includes/common.inc, line 1158
Common functions that many Drupal modules will need to reference.

Code

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

© 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