diff --git a/packages/form/src/Form.php b/packages/form/src/Form.php index 8cd27cccd..110686a3e 100644 --- a/packages/form/src/Form.php +++ b/packages/form/src/Form.php @@ -142,7 +142,7 @@ public function add(string $name, mixed $field, ?string $fieldset = null): Abstr $field->setName($name); $namespace = implode('/', $this->namespaceStack) . '/' . $namespace; - $namespace = trim($namespace, '/') ?: null; + $namespace = trim($namespace, '/') ?: ''; return $this->addField($field, $fieldset, $namespace); }