verbb / gift-voucher

A Craft Commerce plugin to provide Gift Certificate/Voucher functionality.
Other
14 stars 15 forks source link

Error when calling controller actions #127

Open white-lukas opened 6 days ago

white-lukas commented 6 days ago

Describe the bug

When posting to a controller action (ex. gift-voucher/cart/add-code), the $this->request (https://github.com/verbb/gift-voucher/blob/craft-5/src/controllers/CartController.php#L32) value is just a string with the value request, Only in the yii2/base/Controller.php init() method the value is getting set to an actual Request object. When moving the parent::init() function to the top, the value is set correctly

Steps to reproduce

  1. install plugin
  2. submit a form to gift-voucher/cart/add-code

Craft CMS version

5.2.3

Plugin version

4.0.0

Multi-site?

yes

Additional context

No response

engram-design commented 6 days ago

Fixed for the next release. To get this early, run composer require verbb/gift-voucher:"dev-craft-5 as 4.0.0".