Code Duplication    Length = 7-7 lines in 2 locations

src/wp-includes/formatting.php 1 location

@@ 4864-4870 (lines=7) @@
4861
 */
4862
function wp_slash( $value ) {
4863
	if ( is_array( $value ) ) {
4864
		foreach ( $value as $k => $v ) {
4865
			if ( is_array( $v ) ) {
4866
				$value[$k] = wp_slash( $v );
4867
			} else {
4868
				$value[$k] = addslashes( $v );
4869
			}
4870
		}
4871
	} else {
4872
		$value = addslashes( $value );
4873
	}

src/wp-includes/functions.php 1 location

@@ 907-913 (lines=7) @@
904
 * @return array Sanitized $array.
905
 */
906
function add_magic_quotes( $array ) {
907
	foreach ( (array) $array as $k => $v ) {
908
		if ( is_array( $v ) ) {
909
			$array[$k] = add_magic_quotes( $v );
910
		} else {
911
			$array[$k] = addslashes( $v );
912
		}
913
	}
914
	return $array;
915
}
916