]> git.andy128k.dev Git - ipf.git/commitdiff
check if errors exist
authorAndrey Kutejko <andy128k@gmail.com>
Sun, 10 Mar 2019 11:55:00 +0000 (12:55 +0100)
committerAndrey Kutejko <andy128k@gmail.com>
Sun, 10 Mar 2019 11:55:00 +0000 (12:55 +0100)
ipf/form/form.php

index 9a20c83beb24f22ab69ee45d36e3dee789fc48f6..acfc2e076032517c16ead37dc01c978551b2fac0 100644 (file)
@@ -235,7 +235,7 @@ abstract class IPF_Form implements Iterator
 
     public static function renderErrorsAsHTML($errors)
     {
-        if (!count($errors))
+        if (!$errors || !count($errors))
             return '';
         $ul = Tag::ul(array('class' => 'errorlist'));
         foreach ($errors as $err)