Code Duplication    Length = 5-9 lines in 2 locations

core/EE_Session.core.php 2 locations

@@ 642-646 (lines=5) @@
639
            if ($session_data) {
640
                $session_data = preg_replace_callback(
641
                    '!s:(d+):"(.*?)";!',
642
                    function ($match)
643
                    {
644
                        return $match[1] === strlen($match[2])
645
                            ? $match[0]
646
                            : 's:' . strlen($match[2]) . ':"' . $match[2] . '";';
647
                    },
648
                    $session_data
649
                );
@@ 1151-1159 (lines=9) @@
1148
        $error = '<pre>';
1149
        $data2 = preg_replace_callback(
1150
            '!s:(\d+):"(.*?)";!',
1151
            function ($match)
1152
            {
1153
                return ($match[1] === strlen($match[2]))
1154
                    ? $match[0]
1155
                    : 's:'
1156
                      . strlen($match[2])
1157
                      . ':"'
1158
                      . $match[2]
1159
                      . '";';
1160
            },
1161
            $data1
1162
        );