diff --git a/app/code/Magento/Catalog/Model/Product/Image.php b/app/code/Magento/Catalog/Model/Product/Image.php index 7d8b464db3b34..b32abc1310498 100644 --- a/app/code/Magento/Catalog/Model/Product/Image.php +++ b/app/code/Magento/Catalog/Model/Product/Image.php @@ -278,7 +278,7 @@ public function getQuality() */ public function setKeepAspectRatio($keep) { - $this->_keepAspectRatio = (bool)$keep; + $this->_keepAspectRatio = $keep && $keep !== 'false'; return $this; } @@ -288,7 +288,7 @@ public function setKeepAspectRatio($keep) */ public function setKeepFrame($keep) { - $this->_keepFrame = (bool)$keep; + $this->_keepFrame = $keep && $keep !== 'false'; return $this; } @@ -298,7 +298,7 @@ public function setKeepFrame($keep) */ public function setKeepTransparency($keep) { - $this->_keepTransparency = (bool)$keep; + $this->_keepTransparency = $keep && $keep !== 'false'; return $this; } @@ -308,7 +308,7 @@ public function setKeepTransparency($keep) */ public function setConstrainOnly($flag) { - $this->_constrainOnly = (bool)$flag; + $this->_constrainOnly = $flag && $flag !== 'false'; return $this; }