diff --git a/e107_handlers/e_parse_class.php b/e107_handlers/e_parse_class.php index b9decf696..f4cf91316 100644 --- a/e107_handlers/e_parse_class.php +++ b/e107_handlers/e_parse_class.php @@ -1622,14 +1622,14 @@ class e_parse if($raw) $url = $this->createConstants($url, 'mix'); $thurl = ($full ? SITEURL : e_HTTP).'thumb.php?src='.$url.'&'; - if(vartrue($options['aw'])) + if(vartrue($options['aw']) || vartrue($options['ah'])) { - $thurl .= 'aw='.intval($options['aw']).'&ah='.(vartrue($options['ah']) ? intval($options['ah']) : intval($options['aw'])); + $thurl .= 'aw='.((integer) vartrue($options['aw'], 0)).'&ah='.((integer) vartrue($options['ah'], 0)); } else { - if(!vartrue($options['w'])) $options['w'] = 100; - $thurl .= 'aw='.intval($options['w']).'&ah='.(vartrue($options['h']) ? intval($options['h']) : intval($options['w'])); + if(!vartrue($options['w']) && !vartrue($options['h'])) $options['w'] = 100; + $thurl .= 'w='.((integer) vartrue($options['w'], 0)).'&h='.((integer) vartrue($options['h'], 0)); } return $thurl;