It seems that in some cases count($recordData) < $pos, and the issue originates from this file: https://github.com/PHPOffice/PhpSpreadsheet/blob/5.1.0/src/PhpSpreadsheet/Reader/Xls.php#L2025
I'm not sure if I still have a bad file, since it happened overnight during the daily imports.
If I find one, I'll attach it later.
I can see two possible solutions here:
- Silently fail
- Throw an exception if the index is not found (I think this is probably the better option, since such files usually have a bad structure anyways).
I'm not sure which approach is preferred, but I could create a PR if needed (note: this would be my first PR).
Update: Found the file (compressed because github didn't let me upload) -> ddship.zip