From 197f324befe935b3ae15a70364d06760fbfca567 Mon Sep 17 00:00:00 2001 From: Samet Yilmaz Date: Tue, 25 Aug 2015 13:24:29 +0200 Subject: [PATCH] Prevent iterator from being used by reference. Fixes fatal error. --- app/code/Magento/Catalog/Block/Product/View/Gallery.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Block/Product/View/Gallery.php b/app/code/Magento/Catalog/Block/Product/View/Gallery.php index 2312a945f7d0a..faa5c7e78bf01 100644 --- a/app/code/Magento/Catalog/Block/Product/View/Gallery.php +++ b/app/code/Magento/Catalog/Block/Product/View/Gallery.php @@ -30,7 +30,7 @@ public function getGalleryImages() $product = $this->getProduct(); $images = $product->getMediaGalleryImages(); if ($images instanceof \Magento\Framework\Data\Collection) { - foreach ($images as &$image) { + foreach ($images as $image) { $image->setData( 'small_image_url', $this->_imageHelper->init($product, 'product_page_image_small')