Skip to content

Commit c4210d5

Browse files
#39959 catalog_product_save_before observer throws date-related error when using REST API without store-level values (getFinalPrice() issue)
- fix static test errors
1 parent ede0d0a commit c4210d5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/code/Magento/Catalog/Observer/SetSpecialPriceStartDate.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@ public function execute(\Magento\Framework\Event\Observer $observer)
3939
/** @var $product \Magento\Catalog\Model\Product */
4040
$product = $observer->getEvent()->getProduct();
4141
if ($product->getSpecialPrice() && $product->getSpecialFromDate() === null) {
42-
$product->setData('special_from_date',
43-
$this->localeDate->date()->setTime(0, 0)->format('Y-m-d H:i:s'));
42+
$product->setData(
43+
'special_from_date',
44+
$this->localeDate->date()->setTime(0, 0)->format('Y-m-d H:i:s')
45+
);
4446
}
4547
return $this;
4648
}

0 commit comments

Comments
 (0)