Code Duplication    Length = 14-14 lines in 2 locations

Sources/QueryString.php 2 locations

@@ 521-534 (lines=14) @@
518
 * @param int $level Which level we're at within the array (if called recursively)
519
 * @return array|string The decoded string or array of decoded strings
520
 */
521
function urldecode__recursive($var, $level = 0)
522
{
523
	if (!is_array($var))
524
		return urldecode($var);
525
526
	// Reindex the array...
527
	$new_var = array();
528
529
	// Add the htmlspecialchars to every element.
530
	foreach ($var as $k => $v)
531
		$new_var[urldecode($k)] = $level > 25 ? null : urldecode__recursive($v, $level + 1);
532
533
	return $new_var;
534
}
535
/**
536
 * Unescapes any array or variable.  Uses two underscores to guard against overloading.
537
 * What it does:
@@ 573-586 (lines=14) @@
570
 * @param int $level = 0 What level we're at within the array (if called recursively)
571
 * @return array|string The string or array of strings with slashes stripped
572
 */
573
function stripslashes__recursive($var, $level = 0)
574
{
575
	if (!is_array($var))
576
		return stripslashes($var);
577
578
	// Reindex the array without slashes, this time.
579
	$new_var = array();
580
581
	// Strip the slashes from every element.
582
	foreach ($var as $k => $v)
583
		$new_var[stripslashes($k)] = $level > 25 ? null : stripslashes__recursive($v, $level + 1);
584
585
	return $new_var;
586
}
587
588
/**
589
 * Trim a string including the HTML space, character 160.  Uses two underscores to guard against overloading.