[ticket/12193] Fix broken HTML if SQL error occurs during migration

PHPBB3-12193
Merge pull request #2248 from Elsensee/ticket/12193

[ticket/12193] Fix broken HTML if SQL error occurs during migration

* Elsensee/ticket/12193:
  [ticket/12193] Fix broken HTML if SQL error occurs during migration