Skip to content

Conversation

janschoenherr
Copy link
Contributor

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? no
Fixed tickets
License MIT
Doc PR

Currently, if no listeners are registered for an dispatched event, the StopwatchEvent "$eventName.'.loading'" is never being stopped.

Currently, if no listeners are registered for an dispatched event, the StopwatchEvent "$eventName.'.loading'" is never being stopped.
@@ -132,6 +132,10 @@ public function dispatch($eventName, Event $event = null)

$this->firstCalledEvent[$eventName] = $this->stopwatch->start($eventName.'.loading', 'event_listener_loading');

if (!$this->dispatcher->getListeners($eventName)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should use hasListeners instead

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, updated!

fabpot added a commit that referenced this pull request Mar 14, 2013
This PR was squashed before being merged into the 2.2 branch (closes #7365).

Commits
-------

d9ee869 [HttpKernel] Updated TraceableEventDispatcher.php

Discussion
----------

[HttpKernel] Updated TraceableEventDispatcher.php

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no
| Fixed tickets |
| License       | MIT
| Doc PR        |

Currently, if no listeners are registered for an dispatched event, the StopwatchEvent "$eventName.'.loading'" is never being stopped.
@fabpot fabpot closed this Mar 14, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants