Code Duplication    Length = 14-14 lines in 2 locations

Sources/QueryString.php 2 locations

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