VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: stAn99 on February 23, 2012, 00:26:13 AM

Title: Fatal: Cannot unset string offsets : VM2.0.0 + Joomla 1.5.15
Post by: stAn99 on February 23, 2012, 00:26:13 AM
Hello friends,
while developing my component i found this bug within VM2.0.0 while trying to extend VM with a new controller :

Fatal error: Cannot unset string offsets in /libraries/joomla/event/event.php on line 60

caused by file:
/components/com_virtuemart/virtuemart.php

line:
$dispatcher->trigger('onVmSiteController', $_controller);

should be:
$dispatcher->trigger('onVmSiteController', array($_controller));

The original works well on Joomla 1.7+, but gives fatal error in Joomla 1.5

I also ran a search of 'trigger' over all VM files and this could also happen in all occurances of trigger in:
updatesmigration.php

In a few other files an array of post data is directly sent to the plugins without wrapping it to another array:
vendor.php, vendor.php




Best Regards,
Stan