Code Duplication    Length = 5-9 lines in 2 locations

core/EE_Session.core.php 2 locations

@@ 668-672 (lines=5) @@
665
            if ($session_data) {
666
                $session_data = preg_replace_callback(
667
                    '!s:(d+):"(.*?)";!',
668
                    function ($match)
669
                    {
670
                        return $match[1] === strlen($match[2])
671
                            ? $match[0]
672
                            : 's:' . strlen($match[2]) . ':"' . $match[2] . '";';
673
                    },
674
                    $session_data
675
                );
@@ 1139-1147 (lines=9) @@
1136
        $error = '<pre>';
1137
        $data2 = preg_replace_callback(
1138
            '!s:(\d+):"(.*?)";!',
1139
            function ($match)
1140
            {
1141
                return ($match[1] === strlen($match[2]))
1142
                    ? $match[0]
1143
                    : 's:'
1144
                      . strlen($match[2])
1145
                      . ':"'
1146
                      . $match[2]
1147
                      . '";';
1148
            },
1149
            $data1
1150
        );