Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
address
Commits
2b0c7455
Commit
2b0c7455
authored
Sep 14, 2017
by
Bojan Živanović
Browse files
Remove the workaround note, a NULL country_code is expected behavior.
parent
c6a3d221
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/Element/Address.php
View file @
2b0c7455
...
...
@@ -112,8 +112,6 @@ class Address extends FormElement {
if
(
is_array
(
$input
))
{
$input
=
self
::
applyDefaults
(
$input
);
if
(
empty
(
$input
[
'country_code'
])
&&
$element
[
'#required'
])
{
// Workaround for an #ajax bug that causes an empty (but defined)
// $input to be passed when the element is built for the first time.
$input
[
'country_code'
]
=
$element
[
'#default_value'
][
'country_code'
];
}
}
...
...
src/Element/ZoneTerritory.php
View file @
2b0c7455
...
...
@@ -99,8 +99,6 @@ class ZoneTerritory extends FormElement {
if
(
is_array
(
$input
))
{
$input
=
self
::
applyDefaults
(
$input
);
if
(
empty
(
$input
[
'country_code'
])
&&
$element
[
'#required'
])
{
// Workaround for an #ajax bug that causes an empty (but defined)
// $input to be passed when the element is built for the first time.
$input
[
'country_code'
]
=
$element
[
'#default_value'
][
'country_code'
];
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment