fix issue when provided dimensions are null

This commit is contained in:
Nicolas Le Goff 2012-06-06 11:11:58 +02:00
commit 6b9365c082

View file

@ -97,8 +97,13 @@ abstract class DefaultVideo extends DefaultAudio implements Interactive, Resampl
break;
case self::RESIZEMODE_FIT:
default:
$width = $this->width;
$height = $this->height;
if (null !== $this->width && null !== $this->height) {
$width = $this->width;
$height = $this->height;
} else {
$width = $originalWidth;
$height = $originalHeight;
}
break;
}