Code Duplication    Length = 5-9 lines in 2 locations

core/EE_Session.core.php 2 locations

@@ 656-660 (lines=5) @@
653
            if ($session_data) {
654
                $session_data = preg_replace_callback(
655
                    '!s:(d+):"(.*?)";!',
656
                    function ($match)
657
                    {
658
                        return $match[1] === strlen($match[2])
659
                            ? $match[0]
660
                            : 's:' . strlen($match[2]) . ':"' . $match[2] . '";';
661
                    },
662
                    $session_data
663
                );
@@ 1165-1173 (lines=9) @@
1162
        $error = '<pre>';
1163
        $data2 = preg_replace_callback(
1164
            '!s:(\d+):"(.*?)";!',
1165
            function ($match)
1166
            {
1167
                return ($match[1] === strlen($match[2]))
1168
                    ? $match[0]
1169
                    : 's:'
1170
                      . strlen($match[2])
1171
                      . ':"'
1172
                      . $match[2]
1173
                      . '";';
1174
            },
1175
            $data1
1176
        );