-- HikaShop version -- : 6.8.2
-- Joomla version -- : 6.2.1
-- Browser(s) name and version -- : Chrome 156.0
-- Error-message(debug-mod must be tuned on) -- : Call to a member function get() on null
JROOT/plugins/hikashop/attachinvoice/attachinvoice.php:59
plgHikashopAttachinvoice->__construct() - hikashop_import() administrator/components/com_hikashop/helpers/helper.php:757 listing() administrator/components/com_hikashop/views/plugins/view.html.php:147
Dear HikaShop team,
After updating to PDF invoice plugin 5.2.21, opening HikaShop > System > Plugins gives a fatal error:
Call to a member function get() on null
JROOT/plugins/hikashop/attachinvoice/attachinvoice.php:59
plgHikashopAttachinvoice->__construct()
<- hikashop_import() administrator/components/com_hikashop/helpers/helper.php:757
<- PluginsViewPlugins->listing() administrator/components/com_hikashop/views/plugins/view.html.php:147
Cause:
Line 59 in the constructor reads the plugin parameters:
self::$zeroVatSupply = (string)$this->params->get('zero_vat_supply', 'services');
When the plugin is instantiated through hikashop_import() on the plugins listing, no params are passed to the constructor, so $this->params is null and the page crashes.
Fix (tested on our site):
self::$zeroVatSupply = $this->params ? (string)$this->params->get('zero_vat_supply', 'services') : 'services';
With this null check the plugins page opens normally again. Could you include this fix in the next release, so it isn't lost when we update the plugin?
Kind regards,
Lumiga
Kind regards,
Lumiga