[-] CORE : #PSCFV-10389 Avoid eventual empty Specific Price Rule
This commit is contained in:
@@ -267,7 +267,7 @@ class SpecificPriceRuleCore extends ObjectModel
|
||||
public static function applyRuleToProduct($id_rule, $id_product, $id_product_attribute = null)
|
||||
{
|
||||
$rule = new SpecificPriceRule((int)$id_rule);
|
||||
if (!Validate::isLoadedObject($rule))
|
||||
if (!Validate::isLoadedObject($rule) || !$id_product)
|
||||
return false;
|
||||
|
||||
$specific_price = new SpecificPrice();
|
||||
|
||||
Reference in New Issue
Block a user