-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[BUG] Phalcon\Events\Manager->attach('event') fails when preceded by ->dettach('event'). #1331
Comments
On a side note - would be nice if ->dettach() is renamed to ->detach() :-) |
I debugged the flow of class and in file ext/events/manager.c, before line 154 there should be a check is priority_queue an array (after 'dettach' it's null) and this causes phalcon_array_append to print the warning and stop assigning new values. I will try to add fix today, as long as somebody from Phalcon team won't do that before me :) All the best, |
Dzieki! |
Fix is already merged to 1.3.0 - happy coding! |
Thanks! |
Attaching event listeners by event name fails if preceded by detachment of all listeners for that type.
The code:
Execution of above code results in:
PHP Warning: Cannot use a scalar value as an array in AttachDetach.php
No listener is set for 'log' event. _$auth->em->events->log remains NULL.
I am on Phalcon 1.3.0.
Thanks!
The text was updated successfully, but these errors were encountered: