From b2f19483be6ef851caddf5678df0f7b38201eb1d Mon Sep 17 00:00:00 2001 From: Mike de Heij Date: Thu, 8 Feb 2018 11:47:51 +0100 Subject: [PATCH] Fix counting on null in sfValidatorConfigHandler --- .../lib/config/sfValidatorConfigHandler.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/plugins/sfCompat10Plugin/lib/config/sfValidatorConfigHandler.class.php b/lib/plugins/sfCompat10Plugin/lib/config/sfValidatorConfigHandler.class.php index bb9b1ca197..f3923d477c 100644 --- a/lib/plugins/sfCompat10Plugin/lib/config/sfValidatorConfigHandler.class.php +++ b/lib/plugins/sfCompat10Plugin/lib/config/sfValidatorConfigHandler.class.php @@ -104,7 +104,7 @@ public function execute($configFiles) $this->generateRegistration('GET', $data, $methods, $names, $validators); - if (count($fillin)) + if ($fillin !== null && count($fillin)) { $data[] = sprintf(" \$this->context->getRequest()->setAttribute('symfony.fillin', %s);", $fillin); } @@ -117,7 +117,7 @@ public function execute($configFiles) $this->generateRegistration('POST', $data, $methods, $names, $validators); - if (count($fillin)) + if ($fillin !== null && count($fillin)) { $data[] = sprintf(" \$this->context->getRequest()->setAttribute('symfony.fillin', %s);", $fillin); }