8000 [Form] - fixed bug - name in ButtonBuilder by cheprasov · Pull Request #19284 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Form] - fixed bug - name in ButtonBuilder #19284

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
bugfix in Form ButtonBuilder
  • Loading branch information
cheprasov committed Jul 4, 2016
commit af66401b1ba3c0ca0dabb2c424120c546ceb624f
5 changes: 3 additions & 2 deletions src/Symfony/Component/Form/ButtonBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,12 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
*/
public function __construct($name, array $options = array())
{
if (empty($name) && 0 != $name) {
$name = (string) $name;
if ('' === $name) {
throw new InvalidArgumentException('Buttons cannot have empty names.');
}

$this->name = (string) $name;
$this->name = $name;
$this->options = $options;
}

Expand Down
0