Code Duplication    Length = 14-14 lines in 2 locations

Sources/QueryString.php 2 locations

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