Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

In this Discussion

Please use $Sender instead of &$Sender in event handlers.

ToddTodd Chief Product Officer Vanilla Staff
edited October 2011 in Development
When declaring an event handler there are a lot of instances where the $Sender parameter is declared as a reference. This is a bad practice and will break plugins in future versions of Vanilla.

So for example, do this:
public function Base_GetAppSettingsMenuItems_Handler($Sender) {
...
}
instead of this:
public function Base_GetAppSettingsMenuItems_Handler(&$Sender) {
...
}
This has been a Vanilla service announcement.

Comments

Sign In or Register to comment.