From: Andrey Kutejko Date: Sun, 10 Mar 2019 11:55:00 +0000 (+0100) Subject: check if errors exist X-Git-Tag: 0.6~6 X-Git-Url: https://git.andy128k.dev/?a=commitdiff_plain;h=bcbeb812e8910cd1d33f82ff2415567de1d3d9c3;p=ipf.git check if errors exist --- diff --git a/ipf/form/form.php b/ipf/form/form.php index 9a20c83..acfc2e0 100644 --- a/ipf/form/form.php +++ b/ipf/form/form.php @@ -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)