Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/1.0' into 1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
kingjia90 committed Nov 23, 2023
2 parents aa8971f + 368cddc commit fcae91b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Controller/AdminOrderController.php
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ public function detailAction(
$quantity = null;

// get avatar
$user = User::getById($note->getUser());
$user = $note->getUser() ? User::getById($note->getUser()) : null;
$avatar = $user ? sprintf('/admin/user/get-image?id=%d', $user->getId()) : null;

// group events
Expand Down
6 changes: 1 addition & 5 deletions src/PricingManager/Condition/VoucherToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,7 @@ public function check(EnvironmentInterface $environment): bool

public function checkVoucherCode(string $code): bool
{
if (in_array(VoucherServiceToken::getByCode($code)->getVoucherSeriesId(), $this->allowListIds)) {
return true;
}

return false;
return in_array(VoucherServiceToken::getByCode($code)?->getVoucherSeriesId(), $this->allowListIds);
}

public function toJSON(): string
Expand Down

0 comments on commit fcae91b

Please sign in to comment.