User tests: Successful: Unsuccessful:
Pull Request for Issue # .
This change was created with the help of AI (Claude Code).
weblinks:sync-csv --action=import (console plugin) combines each CSV row with the header via array_combine(). On PHP 8 array_combine() throws a ValueError when both arrays have a different number of elements; it no longer returns false. An empty line (which fgetcsv() returns as [null]), e.g. a trailing blank line, or a row with fewer/more columns therefore aborts the whole import with an uncaught exception, and the if (!$data) check is never reached.
Rows whose column count does not match the header are now skipped.
php cli/joomla.php weblinks:sync-csv --action=export --file=<file>.php cli/joomla.php weblinks:sync-csv --action=import --file=<file>.The import finishes; the invalid lines are skipped.
ValueError: array_combine(): Argument #1 ($keys) and argument #2 ($values) must have the same number of elements.
None