Shipping by Rules for VirtueMart

IMPORTANT ANNOUNCEMENT: Plugin development ceased, all plugins made available freely (GPL)

With great sadness we have to announce that we are ceasing development of all our VirtueMart, WooCommerce and Joomla plugins. Effective immediately, all our plugins -- even those that were paid downloads -- are made available for free from our homepage (GPL license still applies), but we cannot and will not provide any support anymore.

It has been a great pleasure to be part of the thriving development communities of VirtueMart as well as WooCommerce. However, during the last year it became painstakingly clear that in addition to a full-time job, a young family and several other time-consuming hobbies at professional level (like being a professional singer) the plugin development and the support that it requires is not sustainable and is taking its toll. It has been an honor, but it is now time to say good bye!



The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1


Warning: array_merge() expects at least 1 paramete 10 Jun 2017 16:13 #1

  • capogr
  • capogr's Avatar Topic Author
Hi i am getting an error

Warning: array_merge() expects at least 1 parameter, 0 given in .../public_html/plugins/vmshipment/rules_shipping_advanced/rules_shipping_framework_joomla.php on line 40

i use Joomla! 3.7.2
php 7.1.
virtuemart VirtueMart 3.2.2

Warning: array_merge() expects at least 1 paramete 19 Jun 2017 01:17 #2

Dear CapoGr,
Thank you for reporting this warning message. This is indeed a little coding error (functionality of the plugin is not impeded at all, just this ugly warning is printed, because we "forgot" to check whether the return value of a function was an empty list or not) and will be fixed in the next version. We don't have any ETA for the next version yet. If you need this warning to disappear as soon as possible, you can manually apply the change yourself. Here is the diff:
diff --git a/rules_shipping_framework_joomla.php b/rules_shipping_framework_joomla.php
index eeb6f71..eea9dec 100644
--- a/rules_shipping_framework_joomla.php
+++ b/rules_shipping_framework_joomla.php
@@ -37,7 +37,11 @@ class RulesShippingFrameworkJoomla extends RulesShippingFramework {
                //          ...);
                $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');

If you are not familiar with how a diff works (it is a markup of changed lines...), simply open the file rules_shipping_framework_joomla.php, look for the line
               $custfuncdefs = call_user_func_array('array_merge', $dispatcher->trigger('onVmShippingRulesRegisterCustomFunctions',array()));
and replace it with:
               $defs = $dispatcher->trigger('onVmShippingRulesRegisterCustomFunctions',array());
               $custfuncdefs = array();
               if (!empty($defs)) {
                       $custfuncdefs = call_user_func_array('array_merge', $defs);

Best regards,

Warning: array_merge() expects at least 1 paramete 19 Jun 2017 08:55 #3

  • capogr
  • capogr's Avatar Topic Author
Thank you

[SOLVED] Warning: array_merge() expects at least 1 paramete 19 Jun 2017 08:55 #4

  • capogr
  • capogr's Avatar Topic Author
Problem solved.
  • Page:
  • 1