stefandoorn / sylius-google-tag-manager-enhanced-ecommerce-plugin

Enhanced Ecommerce implementation through Google Tag Manager for Sylius eCommerce Platform
MIT License
36 stars 20 forks source link

Possible NullPointer in ViewItem #185

Closed dsbe-ak closed 1 year ago

dsbe-ak commented 1 year ago

In StefanDoorn\SyliusGtmEnhancedEcommercePlugin\TagManager\ViewItem::addViewItemData $this->productVariantResolver->getVariant($product) (line 65) can return null (if no variants are enabled) which will make the calculate fail, because the parameter is null.

stefandoorn commented 1 year ago

Thanks :-) Would you be able to submit a PR? I'm also working on this these weeks so can merge it rather soon and iterate.

dsbe-ak commented 1 year ago

186

stefandoorn commented 1 year ago

Will be included in the next release.