An update. Dates of the form '2019-08-00' will trigger the same error. Adding the lines:
[mysqld]
sql_mode="NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
to mysql.cnf
fixes this too. Inserting malformed dates now generates warnings for values out of range but does insert the data.