Code Duplication    Length = 11-11 lines in 2 locations

main/inc/lib/pclzip/pclzip.lib.php 2 locations

@@ 4320-4330 (lines=11) @@
4317
    $v_binary_data = fread($this->zip_fd, 26);
4318
4319
    // ----- Look for invalid block size
4320
    if (strlen($v_binary_data) != 26)
4321
    {
4322
      $p_header['filename'] = "";
4323
      $p_header['status'] = "invalid_header";
4324
4325
      // ----- Error log
4326
      PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid block size : ".strlen($v_binary_data));
4327
4328
      // ----- Return
4329
      return PclZip::errorCode();
4330
    }
4331
4332
    // ----- Extract the values
4333
    $v_data = unpack('vversion/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len', $v_binary_data);
@@ 4423-4433 (lines=11) @@
4420
    $v_binary_data = fread($this->zip_fd, 42);
4421
4422
    // ----- Look for invalid block size
4423
    if (strlen($v_binary_data) != 42)
4424
    {
4425
      $p_header['filename'] = "";
4426
      $p_header['status'] = "invalid_header";
4427
4428
      // ----- Error log
4429
      PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid block size : ".strlen($v_binary_data));
4430
4431
      // ----- Return
4432
      return PclZip::errorCode();
4433
    }
4434
4435
    // ----- Extract the values
4436
    $p_header = unpack('vversion/vversion_extracted/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len/vcomment_len/vdisk/vinternal/Vexternal/Voffset', $v_binary_data);