[-] BO : #PSCFV-2736 : import product : fix bug when the image isn't uploaded

This commit is contained in:
lLefevre
2012-06-13 09:39:51 +00:00
parent b0848106c4
commit 35ebe227be

View File

@@ -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;