diff --git a/core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/SelectionBase.php b/core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/SelectionBase.php index 8c75c98..0cf9502 100644 --- a/core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/SelectionBase.php +++ b/core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/SelectionBase.php @@ -340,7 +340,7 @@ protected function buildEntityQuery($match = NULL, $match_operator = 'CONTAINS') // If 'target_bundles' is NULL, all bundles are referenceable, no further // conditions are needed. - if (isset($handler_settings['target_bundles']) && !is_null($handler_settings['target_bundles'])) { + if (isset($handler_settings['target_bundles']) && is_array($handler_settings['target_bundles'])) { // If 'target_bundles' is an empty array, no bundle is referenceable, // force the query to never return anything and bail out early. if ($handler_settings['target_bundles'] === []) {