ezsystems/ezpublish — pull request #271 by jdespatis (2012-01-03 09:06:49+00:00)
Title: Adding a check in ezpEvent constructor, as it may be possible to add an empty listener, when a user wants to delete an override

This commit is indeed needed by https://github.com/ezsystems/ezjscore/pull/12

Now when an extension (for example ezjscore) adds a listener, it can provide it with a key like: (the key is here ezjscore_css_optimizer)
Listeners[ezjscore_css_optimizer]=optimize/css@callback

and another extension that extends the previous extension (ezjscore in our example), it can safely 'delete' a previously defined listener by performing Listeners[ezjscore_css_optimizer]=

This logic of keyword indicated by @andrerom is nice, as it gives a lot of liberty to another developer that wants to get ride of some listeners afterwards

This commit is just to fix a php warning, as a listener may be empty here