hardevine / LaravelShoppingcart

A simple shopping cart implementation for Laravel
MIT License
348 stars 121 forks source link

Trying to access array offset on value of type null #16

Closed hassansunny closed 3 years ago

hassansunny commented 4 years ago

When I tried to call function of add ... like "Cart::add('293ad', 'Product 1', 1, 9.99);" its give me this error "Trying to access array offset on value of type null". I have seen in deep then I found issue is in "CartUpdatedListener" class." In this its trying to call " $couponName = session()->get('coupon')['name']; " which is not available and that gives error.