fix patch entity when user logs in and cart doesnt have their user id set yet
CI / testsuite (mysql, 8.2, ) (push) Waiting to run Details
CI / testsuite (mysql, 8.4, ) (push) Waiting to run Details
CI / testsuite (sqlite, 8.2, prefer-lowest) (push) Waiting to run Details
CI / Coding Standard & Static Analysis (push) Waiting to run Details

This commit is contained in:
Brandon Shipley 2025-11-07 00:29:36 -08:00
parent f4e03ec35f
commit 80193e6242
Signed by: bmfs
GPG Key ID: 14E38571D8BB0DE4
1 changed files with 1 additions and 1 deletions

View File

@ -93,7 +93,7 @@ class ShoppingCartComponent extends Component
->first(); ->first();
if (isset($cart) && isset($identity) && !isset($cart[$this->userIdField])) { if (isset($cart) && isset($identity) && !isset($cart[$this->userIdField])) {
$cart = $this->Carts->patchEntity([ $cart = $this->Carts->patchEntity($cart, [
$this->userIdField => $identity->getIdentifier(), $this->userIdField => $identity->getIdentifier(),
]); ]);