|
@ -118,12 +118,12 @@ abstract class File |
|
|
if ($this->getIsNoEmpty()) { |
|
|
if ($this->getIsNoEmpty()) { |
|
|
@unlink($this->getRealPath()); |
|
|
@unlink($this->getRealPath()); |
|
|
} |
|
|
} |
|
|
if (get_parent_class($this) == 'Image') { |
|
|
|
|
|
|
|
|
if (get_parent_class($this) == 'dimti\Image\Image') { |
|
|
$image = $this; |
|
|
$image = $this; |
|
|
foreach ($image->getSizes() as $size) { |
|
|
foreach ($image->getSizes() as $size) { |
|
|
$image_variant = $image->getVariant($size); |
|
|
$image_variant = $image->getVariant($size); |
|
|
if ($image_variant->getIsNoEmpty()) { |
|
|
if ($image_variant->getIsNoEmpty()) { |
|
|
@unlink($image->getRealPath()); |
|
|
|
|
|
|
|
|
@unlink($image_variant->getRealPath()); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|