I update Magento from to

magento log this error in system.log

Warning: array_merge_recursive() expects at least 1 parameter, 0 given in /home/example/domains/example.com/public_html/app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php on line 336 2018-12-10T08:05:18+00:00 ERR (3): Warning: array_unique() expects parameter 1 to be array, null given in /home/example/domains/example.com/public_html/app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php on line 337

and this is the function in Productimg.php

 public function filterImageInGallery($product, $image)
        if (!Mage::helper('configurableswatches')->isEnabled()) {
            return true;

        if (!isset($this->_productImageFilters[$product->getId()])) {
            $mapping = call_user_func_array("array_merge_recursive", $product->getChildAttributeLabelMapping());
            $filters = array_unique($mapping['labels']);
            $filters = array_merge($filters, array_map(function ($label) {
                return $label . Mage_ConfigurableSwatches_Helper_Productimg::SWATCH_LABEL_SUFFIX;
            }, $filters));
            $this->_productImageFilters[$product->getId()] = $filters;

        return !in_array(Mage_ConfigurableSwatches_Helper_Data::normalizeKey($image->getLabel()),

how can I solve this problem?

1 Answer 1


Make sure the attribute you're using to allow selection of a simple product is included in the Product Attributes to Show as Swatches in Product Detail list in System > Configuration > Configurable Swatch

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.