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

Commitfa14686

Browse files
committed
Merge branch '4.3' into 4.4
* 4.3: Remove strict true === $user['showEmail'] on preSubmit
2 parents72daec9 +2fa5fa3 commitfa14686

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎form/events.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ method of the ``FormFactory``::
283283
// checks whether the user has chosen to display their email or not.
284284
// If the data was submitted previously, the additional value that is
285285
// included in the request variables needs to be removed.
286-
if (true === $user['showEmail']) {
286+
if (isset($user['showEmail']) && $user['showEmail']) {
287287
$form->add('email', EmailType::class);
288288
} else {
289289
unset($user['email']);
@@ -379,7 +379,7 @@ Consider the following example of a form event subscriber::
379379
// checks whether the user has chosen to display their email or not.
380380
// If the data was submitted previously, the additional value that
381381
// is included in the request variables needs to be removed.
382-
if (true === $user['showEmail']) {
382+
if (isset($user['showEmail']) && $user['showEmail']) {
383383
$form->add('email', EmailType::class);
384384
} else {
385385
unset($user['email']);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp