You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Oh and as a second thought when Baun is emitting the 'baun.beforePageRender' event the it should pass the $data variable by reference so the event handling function is actually able to modify page data that gets rendered by the theme otherwise it only gets a copy of it.
Just created a pull request #15 which fixes the issues mentioned here. It also fixes the issue with data variable being passed by reference; which is basically just changing the $data from an array to an object and back again before using, as only objects are passed by reference when using an arbitrary number of arguments as with func_get_args().
Bug only appears to happen when adding listener to event that has more than one arg. Example 'baun.beforePageRender'.
Baun emits event like this:
But Baun events provider emit function only accepts 2 arguments:
Therefore
$template
gets passed through and$data
does not.This could be fixed by emitting events with multiple args in an array:
The text was updated successfully, but these errors were encountered: