diff --git a/core/lib/Drupal/Core/Field/FieldTypePluginManager.php b/core/lib/Drupal/Core/Field/FieldTypePluginManager.php index 058a28febd..8ff35821f8 100644 --- a/core/lib/Drupal/Core/Field/FieldTypePluginManager.php +++ b/core/lib/Drupal/Core/Field/FieldTypePluginManager.php @@ -168,10 +168,8 @@ public function getPreconfiguredOptions($field_type) { */ public function getPluginClass($type) { $plugin_definition = $this->getDefinition($type, FALSE); - // @todo the use of the coalesce operator below is needed to get - // Drupal\KernelTests\Core\Field\FieldMissingTypeTest tests pass on - // PHP 7.4. - return $plugin_definition['class'] ?? NULL; + $plugin_class = ($plugin_definition && isset($plugin_definition['class'])) ? $plugin_definition['class'] : NULL; + return $plugin_class; } }