Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

BUGFIX Ensure that a single string value (as opposed to an array of

values) is accepted by implode() in CheckboxSetField by casting it
as an array.
  • Loading branch information...
commit 3f68e6f82f1283881e4b807383ff16b58ff57776 1 parent 86bdd16
@halkyon halkyon authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 forms/CheckboxSetField.php
View
4 forms/CheckboxSetField.php
@@ -179,7 +179,7 @@ function saveInto(DataObjectInterface $record) {
if($fieldname && $record && $relation && $relation instanceof RelationList) {
$idList = array();
if($this->value) foreach($this->value as $id => $bool) {
- if($bool) {
+ if($bool) {
$idList[] = $id;
}
}
@@ -187,7 +187,7 @@ function saveInto(DataObjectInterface $record) {
} elseif($fieldname && $record) {
if($this->value) {
$this->value = str_replace(',', '{comma}', $this->value);
- $record->$fieldname = implode(",", $this->value);
+ $record->$fieldname = implode(',', (array) $this->value);
} else {
$record->$fieldname = '';
}
Please sign in to comment.
Something went wrong with that request. Please try again.