Two categories on my website mrmobileuk.com are showing the following error:

Fatal error: Unsupported operand types in app/code/core/Mage/ConfigurableSwatches/Helper/Mediafallback.php on line 61

These are the categories:



Rest other categories are fine.

There have been posts on this issue previously too on your site but no recommended solution has been posted in response.

@murtaza and rest who have been following this post.

There was no problem with the Mediafallback.php file.

Do not edit the core file.

I created new categories and tried to place the products in these new categories one by one. The error showed up again after moving a certain product which was the main cause. It was a configurable product but it wasn't associated with simple products. So I deleted that product and created again and was all fine after that. Because of that, the whole category was showing an error. I still do not know why that product was causing an error but deleting it solved the issue. So if you are keen to know why, you can investigate on that part.

  • Which Magento version are you using exactly ? Commented Mar 8, 2017 at 15:13
  • @Rahphael Am using
    – sash
    Commented Mar 9, 2017 at 9:50

1 Answer 1






and change line number 61 from

$optionLabels += $attribute->getOptionLabels();


$optionLabels .= $attribute->getOptionLabels();

this is how I solve this error.


$optionLabels = $optionLabels + $attribute->getOptionLabels();


 $optionLabels = array_merge($optionLabels , $attribute->getOptionLabels());
  • @Murtaza There is no ConfigurableSwatches folder in Magento_Base_DIR/app/code/local/Mage/ - Do you want me to copy whole folder in to that?
    – sash
    Commented Mar 9, 2017 at 10:08
  • @sash create one folder and paste that php file and then change the code in local code pool Commented Mar 9, 2017 at 10:10
  • @Murtaza I created the folder and edited the file - it worked - but the swatch icons are not showing up now - they are showing an image instead of the colors - mrmobileuk.com/index.php/protection/tablet-protection/…
    – sash
    Commented Mar 9, 2017 at 10:22
  • @sash try edit line instead of previous Commented Mar 9, 2017 at 10:31
  • @Murtaza That brought the swatch icons back but the error is back again too - mrmobileuk.com/index.php/lcds-digitizers-spare-parts.html
    – sash
    Commented Mar 9, 2017 at 10:37

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