Игнор ошибок от unlink в File.

Upload - GreagwarImage сохранение не используется, если активирована библиотека PythonLibs/Image
This commit is contained in:
2014-05-14 14:05:14 +04:00
parent 7c886e1dbf
commit 83215978c3
2 changed files with 17 additions and 12 deletions

View File

@ -116,14 +116,14 @@ abstract class File
* @var $image Image
*/
if ($this->getIsNoEmpty()) {
unlink($this->getRealPath());
@unlink($this->getRealPath());
}
if (get_parent_class($this) == 'Image') {
$image = $this;
foreach ($image->variants as $size) {
foreach ($image->getSizes() as $size) {
$image_variant = $image->getVariant($size);
if ($image_variant->getIsNoEmpty()) {
unlink($image->getRealPath());
@unlink($image->getRealPath());
}
}
}