Code Duplication    Length = 7-9 lines in 2 locations

class/pcltar.lib.php 2 locations

@@ 3345-3353 (lines=9) @@
3342
    */
3343
3344
        // ----- Look for no more block
3345
        if ('' === $v_binary_data) {
3346
            $v_header['filename'] = '';
3347
            $v_header['status']   = 'empty';
3348
3349
            // ----- Return
3350
            TrFctEnd(__FILE__, __LINE__, $v_result, 'End of archive found');
3351
3352
            return $v_result;
3353
        }
3354
3355
        // ----- Look for invalid block size
3356
        if (512 != strlen($v_binary_data)) {
@@ 3400-3406 (lines=7) @@
3397
            $v_header['status']   = 'invalid_header';
3398
3399
            // ----- Look for last block (empty block)
3400
            if ((256 == $v_checksum) && (0 == $v_header['checksum'])) {
3401
                $v_header['status'] = 'empty';
3402
                // ----- Return
3403
                TrFctEnd(__FILE__, __LINE__, $v_result, 'End of archive found');
3404
3405
                return $v_result;
3406
            }
3407
3408
            // ----- Error log
3409
            PclErrorLog(-13, "Invalid checksum : $v_checksum calculated, " . $v_header['checksum'] . ' expected');