res_limit testing and fixing

This commit is contained in:
Shish
2009-07-19 17:18:06 +01:00
parent d8c394c7a5
commit 6799f436ee
2 changed files with 13 additions and 10 deletions

View File

@@ -20,8 +20,8 @@ class ResolutionLimit implements Extension {
if($min_w > 0 && $image->width < $min_w) throw new UploadException("Image too small");
if($min_h > 0 && $image->height < $min_h) throw new UploadException("Image too small");
if($max_w > 0 && $image->width > $min_w) throw new UploadException("Image too large");
if($max_h > 0 && $image->height > $min_h) throw new UploadException("Image too large");
if($max_w > 0 && $image->width > $max_w) throw new UploadException("Image too large");
if($max_h > 0 && $image->height > $max_h) throw new UploadException("Image too large");
if(count($ratios) > 0) {
$ok = false;