Code Duplication    Length = 5-9 lines in 2 locations

core/EE_Session.core.php 2 locations

@@ 634-638 (lines=5) @@
631
            if ($session_data) {
632
                $session_data = preg_replace_callback(
633
                    '!s:(d+):"(.*?)";!',
634
                    function ($match)
635
                    {
636
                        return $match[1] === strlen($match[2])
637
                            ? $match[0]
638
                            : 's:' . strlen($match[2]) . ':"' . $match[2] . '";';
639
                    },
640
                    $session_data
641
                );
@@ 1106-1114 (lines=9) @@
1103
        $error = '<pre>';
1104
        $data2 = preg_replace_callback(
1105
            '!s:(\d+):"(.*?)";!',
1106
            function ($match)
1107
            {
1108
                return ($match[1] === strlen($match[2]))
1109
                    ? $match[0]
1110
                    : 's:'
1111
                      . strlen($match[2])
1112
                      . ':"'
1113
                      . $match[2]
1114
                      . '";';
1115
            },
1116
            $data1
1117
        );