function _fix_gpc_magic_files in Drupal 4
Same name and namespace in other branches
- 5 includes/common.inc \_fix_gpc_magic_files()
- 6 includes/common.inc \_fix_gpc_magic_files()
- 7 includes/common.inc \_fix_gpc_magic_files()
Helper function to strip slashes from $_FILES skipping over the tmp_name keys since PHP generates single backslashes for file paths on Windows systems.
tmp_name does not have backslashes added see http://us2.php.net/manual/en/features.file-upload.php#42280
1 string reference to '_fix_gpc_magic_files'
- fix_gpc_magic in includes/
common.inc - Correct double-escaping problems caused by "magic quotes" in some PHP installations.
File
- includes/
common.inc, line 526 - Common functions that many Drupal modules will need to reference.
Code
function _fix_gpc_magic_files(&$item, $key) {
if ($key != 'tmp_name') {
if (is_array($item)) {
array_walk($item, '_fix_gpc_magic_files');
}
else {
$item = stripslashes($item);
}
}
}