From f95ddf6132364b0fb2787ef2b05f782fd36fabd6 Mon Sep 17 00:00:00 2001 From: yarik Date: Wed, 21 Sep 2016 12:51:37 +0300 Subject: [PATCH] "current" function fix for collection controller --- frontend/controllers/CollectionController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/controllers/CollectionController.php b/frontend/controllers/CollectionController.php index 2b5d9c1..ab178eb 100755 --- a/frontend/controllers/CollectionController.php +++ b/frontend/controllers/CollectionController.php @@ -25,7 +25,8 @@ * @var ProductVariant $variant */ $collection = $this->findCollection($id); - $variant = current($collection->variants); + $variants = $collection->variants; + $variant = current($variants); return $this->redirect([ 'view', 'collection_id' => $collection->product_id, -- libgit2 0.21.4