Commit f95ddf6132364b0fb2787ef2b05f782fd36fabd6
1 parent
9532b442
"current" function fix for collection controller
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
frontend/controllers/CollectionController.php
@@ -25,7 +25,8 @@ | @@ -25,7 +25,8 @@ | ||
25 | * @var ProductVariant $variant | 25 | * @var ProductVariant $variant |
26 | */ | 26 | */ |
27 | $collection = $this->findCollection($id); | 27 | $collection = $this->findCollection($id); |
28 | - $variant = current($collection->variants); | 28 | + $variants = $collection->variants; |
29 | + $variant = current($variants); | ||
29 | return $this->redirect([ | 30 | return $this->redirect([ |
30 | 'view', | 31 | 'view', |
31 | 'collection_id' => $collection->product_id, | 32 | 'collection_id' => $collection->product_id, |