Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0bc7129

Browse files
committed
[Form] Fixed invalid use of FormException
1 parent600007b commit0bc7129

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

‎src/Symfony/Component/Form/ButtonBuilder.php‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
useSymfony\Component\EventDispatcher\EventSubscriberInterface;
1515
useSymfony\Component\Form\Exception\FormException;
16+
useSymfony\Component\Form\Exception\InvalidArgumentException;
1617

1718
/**
1819
* A builder for {@link Button} instances.
@@ -62,7 +63,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
6263
publicfunction__construct($name,array$options)
6364
{
6465
if (empty($name) &&0 !=$name) {
65-
thrownewFormException('Buttons cannot have empty names.');
66+
thrownewInvalidArgumentException('Buttons cannot have empty names.');
6667
}
6768

6869
$this->name = (string)$name;
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespaceSymfony\Component\Form\Exception;
13+
14+
/**
15+
* Base InvalidArgumentException for the Form component.
16+
*
17+
* @author Bernhard Schussek <bschussek@gmail.com>
18+
*/
19+
class InvalidArgumentExceptionextends \InvalidArgumentExceptionimplements ExceptionInterface
20+
{
21+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp