Line 4 of wp-comments-post.php looks like this:
function add_magic_quotes($array) {
foreach ($array as $k => $v) {
if (is_array($v)) {
$array[$k] = add_magic_quotes($v);
} el se {
$array[$k] = addslashes($v);
}
}
return $array;
}
Line 1257 of functions.php looks like this:
function add_magic_quotes( $array ) {
global $wpdb;
foreach ( (array) $array as $k => $v ) {
if ( is_array( $v ) ) {
$array[$k] = add_magic_quotes( $v );
} else {
$array[$k] = $wpdb->escape( $v );
}
}
return $array;
}