As the file declare as strict, \Smile\ProductLabel\Block\ProductLabel\ProductLabel::getProduct can't set $this->product as null, but on empty category, $this->registry->registry('current_product') can be null.
This cause PHP to raise a fatal error.
This PR fix the issue by allowing $this->product to be null
As the file declare as strict,
\Smile\ProductLabel\Block\ProductLabel\ProductLabel::getProduct
can't set$this->product
asnull
, but on empty category,$this->registry->registry('current_product')
can benull
. This cause PHP to raise a fatal error.This PR fix the issue by allowing
$this->product
to benull