Skip to content

Commit

Permalink
Transliterator::transliterate(): Passing null to parameter #1 ($strin…
Browse files Browse the repository at this point in the history
…g) of type string is deprecated
  • Loading branch information
escopecz committed Jun 9, 2023
1 parent 275d05c commit 4372a80
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions app/bundles/FormBundle/Entity/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -779,17 +779,9 @@ public function isStandalone()
/**
* Generate a form name for HTML attributes.
*/
public function generateFormName()
public function generateFormName(): string
{
$name = strtolower(
InputHelper::alphanum(
InputHelper::transliterate(
$this->name
)
)
);

return (empty($name)) ? 'form-'.$this->id : $name;
return $this->name ? strtolower(InputHelper::alphanum(InputHelper::transliterate($this->name))) : 'form-'.$this->id;
}

/**
Expand Down

0 comments on commit 4372a80

Please sign in to comment.