FIX PHP 7.2 error trying to count null validation result

This commit is contained in:
Robbie Averill 2019-07-23 15:04:14 +02:00
parent 68ba83dd6d
commit 6a3a4d0fe2

View File

@ -215,7 +215,7 @@ if (class_exists('EditableFormField')) {
$foundError = false; $foundError = false;
// field validate implementation may not add error to validator // field validate implementation may not add error to validator
if (count($errors) > 0) { if ($errors && count($errors) > 0) {
// check if error already added from fields' validate method // check if error already added from fields' validate method
foreach ($errors as $error) { foreach ($errors as $error) {
if ($error['fieldName'] == $this->Name) { if ($error['fieldName'] == $this->Name) {