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

Possibly wrong condition in Kdyby\Events\DI\EventsExtension::optimizeListeners() #113

Closed
mlutonsky opened this issue Dec 4, 2017 · 2 comments
Labels

Comments

@mlutonsky
Copy link
Contributor

Maybe I just don't understand the meaning of the code, but shouldn't the condition in here:

if (!empty($class)) {

be without the exclamation mark? Because after update to Kdyby/Events 3.1.1 on our projects (we have custom Presenters, Application etc.) it stopped handle events from these over-written classes. So not I am trying to figure out, whether the behaviour before this update was working just as side-effect/bug or now there is a bug :-)

Thanks!

@enumag
Copy link
Member

enumag commented Dec 4, 2017

Indeed this is a bug. It was done by accident during coding style refactoring in this commit. It should be if (!$class) { or if (empty($class)) (. The first might be better because that's what was used before the buggy commit. Send PR please!

@enumag enumag added the bug label Dec 4, 2017
@enumag
Copy link
Member

enumag commented Dec 5, 2017

Fixed in #114.

@enumag enumag closed this as completed Dec 5, 2017
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