Skip to content

Commit d3f8c9a

Browse files
committed
fix php warning
count(): Parameter must be an array or an object that implements Countable
1 parent 164106a commit d3f8c9a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/config/sfValidatorConfigHandler.class.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function execute($configFiles)
9494
$this->loadAttributes($configFiles, $methods, $names, $validators, $config, $list);
9595

9696
// fill-in filter configuration
97-
$fillin = var_export(isset($config['fillin']) ? $config['fillin'] : array(), true);
97+
$fillin = var_export(isset($config['fillin']) ? $config['fillin'] : NULL, true);
9898

9999
// generate GET file/parameter data
100100

@@ -103,7 +103,7 @@ public function execute($configFiles)
103103

104104
$this->generateRegistration('GET', $data, $methods, $names, $validators);
105105

106-
if (count($fillin))
106+
if ($fillin !== "NULL")
107107
{
108108
$data[] = sprintf(" \$context->getRequest()->setAttribute('fillin', %s, 'symfony/filter');", $fillin);
109109
}
@@ -116,7 +116,7 @@ public function execute($configFiles)
116116

117117
$this->generateRegistration('POST', $data, $methods, $names, $validators);
118118

119-
if (count($fillin))
119+
if ($fillin !== "NULL")
120120
{
121121
$data[] = sprintf(" \$context->getRequest()->setAttribute('fillin', %s, 'symfony/filter');", $fillin);
122122
}

0 commit comments

Comments
 (0)