mirror of
https://github.com/silverstripe/silverstripe-spamprotection.git
synced 2024-10-22 14:05:59 +02:00
FIX PHP 7.2 error trying to count null validation result
This commit is contained in:
parent
68ba83dd6d
commit
6a3a4d0fe2
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user