Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions modules/callbacks.inc
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ function entity_plus_metadata_field_property_get($entity, array $options, $name,
$values[$delta] = $data[$columns[0]];
if ($info['type'] == 'boolean' || $info['type'] == 'list<boolean>') {
// Ensure that we have a clean boolean data type.
$values[$delta] = (boolean) $values[$delta];
$values[$delta] = (bool) $values[$delta];
}
}
}
Expand All @@ -487,7 +487,7 @@ function entity_plus_metadata_field_property_set($entity, $name, $value, $langco
$items[$delta][$columns[0]] = $value;
if ($info['type'] == 'boolean' || $info['type'] == 'list<boolean>') {
// Convert boolean values back to an integer for writing.
$items[$delta][$columns[0]] = (integer) $items[$delta][$columns[0]] = $value;
$items[$delta][$columns[0]] = (int) $items[$delta][$columns[0]] = $value;
}
}
}
Expand Down