From 35ebe227bef7d5cd269bc4cf4f355d4e3cebfa7e Mon Sep 17 00:00:00 2001 From: lLefevre Date: Wed, 13 Jun 2012 09:39:51 +0000 Subject: [PATCH] [-] BO : #PSCFV-2736 : import product : fix bug when the image isn't uploaded --- controllers/admin/AdminImportController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/controllers/admin/AdminImportController.php b/controllers/admin/AdminImportController.php index 157240e37..be5401dc5 100644 --- a/controllers/admin/AdminImportController.php +++ b/controllers/admin/AdminImportController.php @@ -1331,7 +1331,10 @@ class AdminImportControllerCore extends AdminController // associate image to selected shops $image->associateTo($shops); if (!AdminImportController::copyImg($product->id, $image->id, $url)) - $this->warnings[] = Tools::displayError('Error copying image:').' '.$url; + { + $image->delete(); + $this->warnings[] = sprintf(Tools::displayError('Error copying image: %s'), $url); + } } else $error = true;