I'm trying to bind to the onEditionChange event with something like this:

craft()->on('onEditionChange', function (Event $event) {

However, i'm getting this error:

Undefined offset: 1

Seems it expects an dot in there. Is there another way to bind to this event?

1 Answer 1


Because that particular event is raised from AppBehavior (and therefore WebApp), it doesn't follow the same component.eventName syntax that the other Craft events use and you can't use craft->on() to register to listen to it.

You can register to listen to it through the traditional Yii method, though. This should work for you:

craft()->onEditionChange = function (Event $event) {

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.