From 57f402dd636d35088c34fc0db71556ab128a7881 Mon Sep 17 00:00:00 2001 From: Alexander Demidov Date: Sat, 29 Nov 2014 10:53:50 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B8?= =?UTF-8?q?=20=D0=B2=20File::delete().=20=D0=9D=D0=B5=20=D1=80=D0=B0=D0=B1?= =?UTF-8?q?=D0=BE=D1=82=D0=B0=D0=BB=D0=BE=20=D1=83=D0=B4=D0=B0=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=B2=D0=B0=D1=80=D0=B8=D0=B0=D0=BD=D1=82?= =?UTF-8?q?=D0=BE=D0=B2=20=D1=81=D1=82=D0=B0=D1=80=D1=8B=D1=85=20=D0=B8?= =?UTF-8?q?=D0=B7=D0=BE=D0=B1=D1=80=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- File.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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()); } } }