diff --git a/core/lib/Drupal/Core/Entity/Field/Type/EntityWrapper.php b/core/lib/Drupal/Core/Entity/Field/Type/EntityWrapper.php index eb6ae7d888b..f6f224e0aff 100644 --- a/core/lib/Drupal/Core/Entity/Field/Type/EntityWrapper.php +++ b/core/lib/Drupal/Core/Entity/Field/Type/EntityWrapper.php @@ -90,7 +90,7 @@ class EntityWrapper extends TypedData implements IteratorAggregate, ComplexDataI if ($value instanceof EntityInterface && $value->isNew()) { $this->newEntity = $value; $this->entityType = $value->entityType(); - $value = FALSE; + $value = 0; } elseif ($value instanceof EntityInterface) { $this->entityType = $value->entityType(); diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/formatter/TaxonomyFormatterBase.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/formatter/TaxonomyFormatterBase.php index f5071375618..a17bdbaacea 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/formatter/TaxonomyFormatterBase.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/formatter/TaxonomyFormatterBase.php @@ -30,7 +30,7 @@ abstract class TaxonomyFormatterBase extends FormatterBase { foreach ($entities as $id => $entity) { foreach ($items[$id] as $delta => $item) { // Force the array key to prevent duplicates. - if ($item['tid'] !== FALSE) { + if ($item['tid'] !== 0) { $tids[$item['tid']] = $item['tid']; } } @@ -51,7 +51,7 @@ abstract class TaxonomyFormatterBase extends FormatterBase { $items[$id][$delta]['entity'] = $terms[$item['tid']]; } // Terms to be created are not in $terms, but are still legitimate. - elseif ($item['tid'] === FALSE && isset($item['entity'])) { + elseif ($item['tid'] === 0 && isset($item['entity'])) { // Leave the item in place. } // Otherwise, unset the instance value, since the term does not exist. diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/widget/TaxonomyAutocompleteWidget.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/widget/TaxonomyAutocompleteWidget.php index 7ceb3509536..01a01faf7d9 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/widget/TaxonomyAutocompleteWidget.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/widget/TaxonomyAutocompleteWidget.php @@ -97,7 +97,7 @@ class TaxonomyAutocompleteWidget extends WidgetBase { 'vid' => $vocabulary->id(), 'name' => $value, )); - $item = array('tid' => FALSE, 'entity' => $term); + $item = array('tid' => 0, 'entity' => $term); } $items[] = $item; }