#57572TceformsUpdateWizard has to handle SQL errors
Description
There might be situations where the SELECT query fails. This only leads to a PHP warning currently, as the foreach loop does not work on the NULL value.
Fix that to issue a better warning including the SQL error.