Code Duplication    Length = 14-14 lines in 2 locations

include/functions.php 1 location

@@ 57-70 (lines=14) @@
54
 *
55
 * @return array|string
56
 */
57
function prepOut(&$var)
58
{
59
    if (is_array($var)) {
60
        foreach ($var as $i => $v) {
61
            $var[$i] = prepOut($v);
62
        }
63
    } else {
64
        if (is_string($var)) {
65
            $var = htmlspecialchars($var);
66
        }
67
    }
68
69
    return $var;
70
}
71

extras/gwiki.php 1 location

@@ 55-68 (lines=14) @@
52
 *
53
 * @return array|string
54
 */
55
function prepOut(&$var)
56
{
57
    if (is_array($var)) {
58
        foreach ($var as $i => $v) {
59
            $var[$i] = prepOut($v);
60
        }
61
    } else {
62
        if (is_string($var)) {
63
            $var = htmlspecialchars($var);
64
        }
65
    }
66
67
    return $var;
68
}
69
70
/**
71
 * @param        $name