Hi,
I have a module with a php 8 error that I just can't figure out how to resolve. I'm sure it's very easy, but I'm struggling. Anyone know how to resolve? @datakick?
This is the error:
This is the code snippet causing issue:
public function __get($name)
{
if ($name === 'module') {
return $this->module = Module::getInstanceByName('rg_smartpopup');
}
if ($name === 'popup') {
if (!(int) $this->id_popup) {
throw new PrestaShopException('The property `id_popup` is required.');
}
return $this->popup = new RgSpPopup((int) $this->id_popup, (int) $this->id_lang);
}
return parent::__get($name); // Ensure compatibility with ObjectModelCore
}