From 58c127bcf76886ed37ec3cf97675aec63eda362c Mon Sep 17 00:00:00 2001 From: stephweb Date: Wed, 4 Sep 2019 21:44:02 +0200 Subject: [PATCH] Add compatibility with >=7.2 for tests --- src/FormBuilder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FormBuilder.php b/src/FormBuilder.php index 992cc0c..50388ac 100644 --- a/src/FormBuilder.php +++ b/src/FormBuilder.php @@ -1298,7 +1298,7 @@ class FormBuilder && is_null($old) && is_null($value) && !is_null($this->view->shared('errors')) - && count($this->view->shared('errors')) > 0 + && count(php_sapi_name() === 'cli' ? [] : $this->view->shared('errors')) > 0 ) { return null; }