diff --git a/File.php b/File.php index cbe4c57..93f00f6 100644 --- a/File.php +++ b/File.php @@ -118,12 +118,12 @@ abstract class File if ($this->getIsNoEmpty()) { @unlink($this->getRealPath()); } - if (get_parent_class($this) == 'Image') { + if (get_parent_class($this) == 'dimti\Image\Image') { $image = $this; foreach ($image->getSizes() as $size) { $image_variant = $image->getVariant($size); if ($image_variant->getIsNoEmpty()) { - @unlink($image->getRealPath()); + @unlink($image_variant->getRealPath()); } } }