Skip to content

Commit

Permalink
Fix counting on null in sfValidatorConfigHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
mdeheij committed Feb 8, 2018
1 parent cd3dd23 commit b2f1948
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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);
}
Expand Down

0 comments on commit b2f1948

Please sign in to comment.