Kaynağa Gözat

Correctif

packProduct
Guillaume 3 yıl önce
ebeveyn
işleme
56cd009e7c
1 değiştirilmiş dosya ile 4 ekleme ve 3 silme
  1. +4
    -3
      Solver/Product/ProductFamilySolver.php

+ 4
- 3
Solver/Product/ProductFamilySolver.php Dosyayı Görüntüle

@@ -94,11 +94,10 @@ class ProductFamilySolver
$products = $this->getProductsOnline($productFamily)->getValues();
if (count($products) > 0) {
usort($products, $comparisonFunction);

return $products[0];
}
} else {
return $this->getOriginProduct($returnSelfIfNotActiveProducts);
return $this->getOriginProduct($productFamily);
}
if ($returnSelfIfNotActiveProducts) {
return $productFamily;
@@ -271,7 +270,7 @@ class ProductFamilySolver
}


public function getOriginProduct(ProductFamilyInterface $productFamily): ProductInterface
public function getOriginProduct(ProductFamilyInterface $productFamily): ?ProductInterface
{
$products = $productFamily->getProducts();

@@ -280,6 +279,8 @@ class ProductFamilySolver
return $product;
}
}

return null;
}



Yükleniyor…
İptal
Kaydet