Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EventUtil::registerPersistentModuleHandler() #727

Closed
cmfcmf opened this issue Feb 13, 2013 · 2 comments
Closed

EventUtil::registerPersistentModuleHandler() #727

cmfcmf opened this issue Feb 13, 2013 · 2 comments
Labels

Comments

@cmfcmf
Copy link
Contributor

cmfcmf commented Feb 13, 2013

If I call it twice with the same arguments (for example if installation of a module fails after the handler registration for some other reaseon [see #484 too]), for example:

 EventUtil::registerPersistentModuleHandler('Newsletter', 'frontcontroller.predispatch', array('Newsletter_Listener_AutoSend', 'pageLoadListener'));

It is written two times in database. So the Listener pageLoadListener is always called twice.
Couldn't the second call simply be ignored?

I cannnot imagine a case, where calling the handler always twice is wanted.

@phaidon
Copy link
Contributor

phaidon commented Jul 19, 2013

👍

@ghost
Copy link

ghost commented Jul 19, 2013

Sure, it could be a bit more robust for sure.

@cmfcmf cmfcmf closed this as completed in 1dea5be Sep 6, 2013
ghost pushed a commit that referenced this issue Sep 6, 2013
Do not register hooks and eventhandlers twice, closes #727, closes #484.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants