//fixed bug "this product does not exist in this shop."

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16587 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
vAugagneur
2012-07-26 14:03:08 +00:00
parent 0835613ee2
commit 116221b382
@@ -2233,9 +2233,12 @@ class AdminProductsControllerCore extends AdminController
$product = $this->object;
if ($this->display == 'edit' && Shop::isFeatureActive() && Shop::getContext() == Shop::CONTEXT_SHOP && !$product->isAssociatedToShop($this->context->shop->id))
if ($this->display == 'edit' && Validate::isLoadedObject($product) && Shop::isFeatureActive() && Shop::getContext() == Shop::CONTEXT_SHOP && !$product->isAssociatedToShop($this->context->shop->id))
{
$this->displayWarning($this->l('Warning: this product does not exist in this shop.'));
return;
}
// Product for multishop
$this->context->smarty->assign('bullet_common_field', '');
if (Shop::isFeatureActive() && $this->display == 'edit')