diff --git a/core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php b/core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php index d47f621..4152a3d 100644 --- a/core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php +++ b/core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php @@ -78,17 +78,18 @@ public static function generateSampleValue(FieldDefinitionInterface $field_defin * {@inheritdoc} */ public function isEmpty() { - // Based on the PHP empty() function the value is not empty, so there's no need to continue. + // Based on the PHP empty() function the value is not empty, so there's no + // need to continue. if (!empty($this->value)) { return FALSE; } - // Type of list_boolean + // Type of list_boolean. elseif (isset($this->type) && $this->type == 'list_boolean') { - return (bool) ($this->value == '0'); + return $this->value == '0'; } // Other types. else { - return (bool) ($this->value != '0'); + return $this->value != '0'; } }