diff --git a/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php b/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php index 99f5aa4e7c..8fb6236830 100644 --- a/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php +++ b/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php @@ -397,12 +397,13 @@ protected function getTableMapping($table, $entity_type_id) { * @param string $sql_column * This is the SQL column in the existing table being joined to. * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $field_storage - * The field storage definition for the field referencing this column. + * (optional) The field storage definition for the field referencing this + * column. This will be required in 9.0.x. * * @return string * The alias of the next entity table joined in. */ - protected function addNextBaseTable(EntityType $entity_type, $table, $sql_column, FieldStorageDefinitionInterface $field_storage) { + protected function addNextBaseTable(EntityType $entity_type, $table, $sql_column, FieldStorageDefinitionInterface $field_storage = NULL) { $join_condition = '%alias.' . $entity_type->getKey('id') . " = $table.$sql_column"; return $this->sqlQuery->leftJoin($entity_type->getBaseTable(), NULL, $join_condition); }