From baf17b2ed47429af0f4756e3e8e05dac7d5388b6 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 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16005 b9a71923-0436-4b27-9f14-aed3839534dd --- 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;