From b50ceef15b615f98016dfff8116d1803bdfd3a95 Mon Sep 17 00:00:00 2001 From: jmauzyk Date: Wed, 29 Jul 2020 12:49:42 -0500 Subject: [PATCH] Fix ErrorException from undefined variable uid --- src/GiftVoucher.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GiftVoucher.php b/src/GiftVoucher.php index ae063bd..f9710f3 100755 --- a/src/GiftVoucher.php +++ b/src/GiftVoucher.php @@ -192,8 +192,8 @@ private function _registerPermissions() $voucherTypePermissions = []; - foreach ($voucherTypes as $id => $voucherType) { - $suffix = ':' . $uid; + foreach ($voucherTypes as $voucherType) { + $suffix = ':' . $voucherType->uid; $voucherTypePermissions['giftVoucher-manageVoucherType' . $suffix] = ['label' => Craft::t('gift-voucher', 'Manage “{type}” vouchers', ['type' => $voucherType->name])]; }