Code Duplication    Length = 5-9 lines in 2 locations

core/EE_Session.core.php 2 locations

@@ 488-492 (lines=5) @@
485
             if ($session_data) {
486
                 $session_data = preg_replace_callback(
487
                     '!s:(d+):"(.*?)";!',
488
                     function ($match) {
489
                         return $match[1] === strlen($match[2])
490
                             ? $match[0]
491
                             : 's:' . strlen($match[2]) . ':"' . $match[2] . '";';
492
                     },
493
                     $session_data
494
                 );
495
             }
@@ 1027-1035 (lines=9) @@
1024
		$error = "<pre>";
1025
		 $data2 = preg_replace_callback(
1026
			 '!s:(\d+):"(.*?)";!',
1027
			 function ( $match ) {
1028
				 return ( $match[1] === strlen( $match[2] ) )
1029
					 ? $match[0]
1030
					 : 's:'
1031
					   . strlen( $match[2] )
1032
					   . ':"'
1033
					   . $match[2]
1034
					   . '";';
1035
			 },
1036
			 $data1
1037
		 );
1038
		$max = ( strlen( $data1 ) > strlen( $data2 ) ) ? strlen( $data1 ) : strlen( $data2 );