Skip to content

Commit 6d8a2b9

Browse files
author
maxiloc
committed
Merge pull request #316 from Floddy/oneparamimages
If a config value for image size is empty, return null
2 parents d6317fc + 40740ee commit 6d8a2b9

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

code/Helper/Config.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,20 @@ public function noProcess($storeId = null)
123123

124124
public function getImageWidth($storeId = null)
125125
{
126-
return Mage::getStoreConfig(self::XML_PATH_IMAGE_WIDTH, $storeId);
126+
$imageWidth = Mage::getStoreConfig(self::XML_PATH_IMAGE_WIDTH, $storeId);
127+
if(empty($imageWidth)) {
128+
return null;
129+
}
130+
return $imageWidth;
127131
}
128132

129133
public function getImageHeight($storeId = null)
130134
{
131-
return Mage::getStoreConfig(self::XML_PATH_IMAGE_HEIGHT, $storeId);
135+
$imageHeight = Mage::getStoreConfig(self::XML_PATH_IMAGE_HEIGHT, $storeId);
136+
if(empty($imageHeight)) {
137+
return null;
138+
}
139+
return $imageHeight;
132140
}
133141

134142
public function getImageType($storeId = null)

0 commit comments

Comments
 (0)