From e00fc00664d9782376ff75fb5bc48e3a5b3f3764 Mon Sep 17 00:00:00 2001 From: Juerd Waalboer Date: Tue, 1 Oct 2019 02:40:00 +0200 Subject: [PATCH] Fix bug: warning when there is no acting user --- plugins/revspace_saldo | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/revspace_saldo b/plugins/revspace_saldo index e8a644b..52fa2d7 100644 --- a/plugins/revspace_saldo +++ b/plugins/revspace_saldo @@ -15,6 +15,8 @@ sub _box { sub hook_checkout_done { my ($class, $cart, $user, $transaction_id) = @_; + defined $user or return; # hacks like 'undo' don't have an acting user + my $balance = RevBank::Users::balance($user) or return; my $since = RevBank::Users::since($user);