Skip to content

Commit

Permalink
Fixed #3364 saving a sale error
Browse files Browse the repository at this point in the history
  • Loading branch information
nfourtythree committed Jan 12, 2024
1 parent a2feb13 commit 01c5b4a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,9 @@
# Release Notes for Craft Commerce

## Unreleased

- 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))
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/SalesController.php
Expand Up @@ -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) {
Expand Down

0 comments on commit 01c5b4a

Please sign in to comment.