Code Duplication    Length = 5-9 lines in 2 locations

core/EE_Session.core.php 2 locations

@@ 624-628 (lines=5) @@
621
            if ($session_data) {
622
                $session_data = preg_replace_callback(
623
                    '!s:(d+):"(.*?)";!',
624
                    function ($match)
625
                    {
626
                        return $match[1] === strlen($match[2])
627
                            ? $match[0]
628
                            : 's:' . strlen($match[2]) . ':"' . $match[2] . '";';
629
                    },
630
                    $session_data
631
                );
@@ 1149-1157 (lines=9) @@
1146
        $error = '<pre>';
1147
        $data2 = preg_replace_callback(
1148
            '!s:(\d+):"(.*?)";!',
1149
            function ($match)
1150
            {
1151
                return ($match[1] === strlen($match[2]))
1152
                    ? $match[0]
1153
                    : 's:'
1154
                      . strlen($match[2])
1155
                      . ':"'
1156
                      . $match[2]
1157
                      . '";';
1158
            },
1159
            $data1
1160
        );