diff --git a/CHANGELOG.md b/CHANGELOG.md index d45a62d69d..749dd0f18e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Release Notes for Craft Commerce +## 4.4.1.1 - 2024-01-12 + +- Fixed a PHP error that occurred when saving a sale. ([#3364](https://github.com/craftcms/commerce/issues/3364)) + ## 4.4.1 - 2024-01-12 - Fixed a SQL error that could occur when updating to Commerce 4.4.0 on MySQL. ([#3367](https://github.com/craftcms/commerce/issues/3367)) diff --git a/src/controllers/SalesController.php b/src/controllers/SalesController.php index e75b04036a..64ab1b4fc1 100644 --- a/src/controllers/SalesController.php +++ b/src/controllers/SalesController.php @@ -142,7 +142,7 @@ public function actionSave(): ?Response $sale->sortOrder = (int)$this->request->getBodyParam('sortOrder'); $sale->ignorePrevious = (bool)$this->request->getBodyParam('ignorePrevious'); $sale->stopProcessing = (bool)$this->request->getBodyParam('stopProcessing'); - $sale->categoryRelationshipType = $this->request->getBodyParam('categoryRelationshipType'); + $sale->categoryRelationshipType = $this->request->getBodyParam('categoryRelationshipType', $sale->categoryRelationshipType); $applyAmount = Localization::normalizeNumber($applyAmount); if ($sale->apply == SaleRecord::APPLY_BY_PERCENT || $sale->apply == SaleRecord::APPLY_TO_PERCENT) {