diff --git a/rules_shipping_framework_joomla.php b/rules_shipping_framework_joomla.php index eeb6f71d7dfcc0f56a2eaf910d08cebc90c76526..eea9dec844049107593e9f6c9bc86533bf6a44d1 100644 --- a/rules_shipping_framework_joomla.php +++ b/rules_shipping_framework_joomla.php @@ -37,7 +37,11 @@ class RulesShippingFrameworkJoomla extends RulesShippingFramework { // ...); JPluginHelper::importPlugin('vmshipmentrules'); $dispatcher = JDispatcher::getInstance(); - $custfuncdefs = call_user_func_array('array_merge', $dispatcher->trigger('onVmShippingRulesRegisterCustomFunctions',array())); + $defs = $dispatcher->trigger('onVmShippingRulesRegisterCustomFunctions',array()); + $custfuncdefs = array(); + if (!empty($defs)) { + $custfuncdefs = call_user_func_array('array_merge', $defs); + } $custfuncdefs['convertfromcurrency'] = array($this, 'convert_from_currency'); $custfuncdefs['converttocurrency'] = array($this, 'convert_to_currency');