Skip to content

Commit 7ae1238

Browse files
Merge branch '2.1.x' into 2.2.x
2 parents 58e12cf + bce044e commit 7ae1238

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

grails-web/src/main/groovy/org/codehaus/groovy/grails/web/binding/GrailsDataBinder.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -919,8 +919,14 @@ else if (v instanceof String) {
919919
}
920920
}
921921
else if (GrailsDomainConfigurationUtil.isBasicType(associatedType)) {
922-
if (isArray) {
923-
Object[] values = (Object[])v;
922+
Object[] values = null;
923+
if(isArray) {
924+
values = (Object[])v;
925+
} else if(v instanceof String) {
926+
values = new String[]{(String)v};
927+
}
928+
929+
if (values != null) {
924930
List list = collection instanceof List ? (List)collection : null;
925931
for (int i = 0; i < values.length; i++) {
926932
Object value = values[i];
@@ -942,6 +948,7 @@ else if (GrailsDomainConfigurationUtil.isBasicType(associatedType)) {
942948
// ignore
943949
}
944950
}
951+
mpvs.removePropertyValue(pv);
945952
}
946953
}
947954
}

0 commit comments

Comments
 (0)