Issue #3117532 by fgm: don't use count() on form_get_errors() result.
form_get_errors() returns null instead of array() when no errors are found, which causes a warning in PHP 7.3 and 7.4.
form_get_errors() returns null instead of array() when no errors are found, which causes a warning in PHP 7.3 and 7.4.