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 | 25 | * @var ProductVariant $variant |
| 26 | 26 | */ |
| 27 | 27 | $collection = $this->findCollection($id); |
| 28 | - $variant = current($collection->variants); | |
| 28 | + $variants = $collection->variants; | |
| 29 | + $variant = current($variants); | |
| 29 | 30 | return $this->redirect([ |
| 30 | 31 | 'view', |
| 31 | 32 | 'collection_id' => $collection->product_id, | ... | ... |