[-] 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
This commit is contained in:
1 parent
e806afacb2
commit
baf17b2ed4
1 file changed
+4
-1
@@ -1331,7 +1331,10 @@ class AdminImportControllerCore extends AdminController
|
|||||||
// associate image to selected shops
|
// associate image to selected shops
|
||||||
$image->associateTo($shops);
|
$image->associateTo($shops);
|
||||||
if (!AdminImportController::copyImg($product->id, $image->id, $url))
|
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
|
else
|
||||||
$error = true;
|
$error = true;
|
||||||
|
|||||||
Reference in new issue
Block a user