summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--imagecache.module3
1 files changed, 3 insertions, 0 deletions
diff --git a/imagecache.module b/imagecache.module
index 41abbc6..450463a 100644
--- a/imagecache.module
+++ b/imagecache.module
@@ -110,6 +110,9 @@ function imagecache_cache() {
break;
case 'scale':
+ // set impossibly large values if the width and height aren't set.
+ $action['data']['width'] = $action['data']['width'] ? $action['data']['width'] : 9999999;
+ $action['data']['height'] = $action['data']['height'] ? $action['data']['height'] : 9999999;
if (!image_scale($tmpdestination, $tmpdestination, $action['data']['width'], $action['data']['height'])) {
watchdog('imagecache', t('Imagecache scale action ID %id failed.', array('%id' => $action['actionid'])), WATCHDOG_ERROR);
}