Code Duplication    Length = 11-11 lines in 2 locations

src/wp-admin/includes/class-pclzip.php 2 locations

@@ 4298-4308 (lines=11) @@
4295
    $v_binary_data = fread($this->zip_fd, 26);
4296
4297
    // ----- Look for invalid block size
4298
    if (strlen($v_binary_data) != 26)
4299
    {
4300
      $p_header['filename'] = "";
4301
      $p_header['status'] = "invalid_header";
4302
4303
      // ----- Error log
4304
      PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid block size : ".strlen($v_binary_data));
4305
4306
      // ----- Return
4307
      return PclZip::errorCode();
4308
    }
4309
4310
    // ----- Extract the values
4311
    $v_data = unpack('vversion/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len', $v_binary_data);
@@ 4401-4411 (lines=11) @@
4398
    $v_binary_data = fread($this->zip_fd, 42);
4399
4400
    // ----- Look for invalid block size
4401
    if (strlen($v_binary_data) != 42)
4402
    {
4403
      $p_header['filename'] = "";
4404
      $p_header['status'] = "invalid_header";
4405
4406
      // ----- Error log
4407
      PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid block size : ".strlen($v_binary_data));
4408
4409
      // ----- Return
4410
      return PclZip::errorCode();
4411
    }
4412
4413
    // ----- Extract the values
4414
    $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);