Skip to content

Commit

Permalink
adds handling for null customer id
Browse files Browse the repository at this point in the history
  • Loading branch information
cykolln committed Nov 1, 2024
1 parent 10b5c10 commit 4fe7c46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Observer/SalesQuoteSaveAfter.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public function execute(Observer $observer)
*/
private function checkCustomerAndReturnEncodedId($quote)
{
if ($this->_customerSession->isLoggedIn()) {
if ($this->_customerSession->isLoggedIn() && $quote->getCustomer()->getId()) {
$customerId = $quote->getCustomer()->getId();
return base64_encode($customerId);
} else {
Expand Down

0 comments on commit 4fe7c46

Please sign in to comment.