diff --git a/core/modules/quickedit/src/MetadataGenerator.php b/core/modules/quickedit/src/MetadataGenerator.php index 653ad4fb9f..1f96d8eef4 100644 --- a/core/modules/quickedit/src/MetadataGenerator.php +++ b/core/modules/quickedit/src/MetadataGenerator.php @@ -78,8 +78,8 @@ public function generateFieldMetadata(FieldItemListInterface $items, $view_mode) $entity = $items->getEntity(); $field_name = $items->getFieldDefinition()->getName(); - if ($this->currentUser == NULL) { - $this->currentUser = Drupal::currentUser(); + if ($this->currentUser === NULL) { + $this->currentUser = \Drupal::currentUser(); } // Early-return if user does not have access.