concretecms-community-store / community_store

An open, free and community developed eCommerce system for Concrete CMS
https://concretecms-community-store.github.io/community_store/
MIT License
106 stars 66 forks source link

Undefined variable $product #756

Closed shitehawke closed 1 year ago

shitehawke commented 1 year ago

Hi, fresh install on Concrete 9.1.3, using community store V 2.4.8.5. PHP 8.2 When trying to edit the product template via Page Types > Output, I get an "Undefined variable $product" warning on line 7 of the view.php file if (is_object($product) && $product->isActive()) {

Is this a php8 bug?

Mesuva commented 1 year ago

Yes, a PHP8 bug. Try this quick fix here: https://github.com/concretecms-community-store/community_store/commit/1b2af129ecfd7986da6a9652c21df8fce03ce8fa

shitehawke commented 1 year ago

That's perfect, thanks!

mlocati commented 1 year ago

This issue can be closed, isn't it?