In computeCount() for MigrateSourceCSV there is an issue in the code for embedded newlines.

The first is that the comment for skipping headers is misleading ("Skip all but the last header": it isn't, it's skipping all of them). The second is that the loop to skip headers is using fgets(), which doesn't take into account embedded newlines itself, so if there are any in the header row it will skip the wrong number. The code should be using $this->getNextLine() instead.

Comments

KarlShea created an issue. See original summary.

karlshea’s picture

Status: Active » Needs review
StatusFileSize
new628 bytes
karlshea’s picture

StatusFileSize
new536 bytes

Reroll

pifagor’s picture

Status: Needs review » Reviewed & tested by the community

  • pifagor committed f7cc2bc on 7.x-2.x authored by KarlShea
    Issue #2770093 by KarlShea, pifagor: computeCount() incorrect for...
pifagor’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

joseph.olstad’s picture