ProductVariationStorage::loadEnabled() will fail when there is no variations for product

Created on 11 May 2023, over 1 year ago
Updated 15 May 2023, over 1 year ago

The query

    $query = $this->getQuery()
      ->accessCheck(TRUE)
      ->addTag('entity_access')
      ->condition('status', TRUE)
      ->condition('variation_id', $ids, 'IN');

Will fail when there are no variations for a product and $ids is empty

I came across this when trying to create a feed in the commerce_product_feeds module

🐛 Bug report
Status

Fixed

Version

2.0

Component

Product

Created by

🇳🇱Netherlands tim_dj Netherlands

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024