PDA

View Full Version : Moved code from global_start to global_bootstrap_init_start and it stopped working...


BirdOPrey5
10-09-2011, 06:10 PM
I'm upgradibg on of my mods to VB4 and so as usual I changed hooks from global_start to global_bootstrap_init_start and usually everything works fine...

But not today.

In the plugin I build some arrays from settings data, say $my_array1, $my_array2, and $my_array3.

In VB3 those arrays were available in another plugin on the hook profile_editoptions_start.

In VB4 if I use global_start they still work in the other plugin, but when I change them to global_bootstrap_init_start I get errors, the array isn't valid.


I tried making them global in profile_editoptions_start by putting in the line:

global $my_array1, $my_array2, $my_array3;


But it still doesn't work... what am I missing? :confused:

BirdOPrey5
10-09-2011, 07:05 PM
Figured it out... Against everything I thought I knew about PHP I had to put the global statement in global_bootstrap_init_start not the other plugin.