8000 [HttpKernel] Illegal Offset Type in TraceableEventDispatcher · Issue #9727 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[HttpKernel] Illegal Offset Type in TraceableEventDispatcher #9727

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

Closed
pjordaan opened this issue Dec 9, 2013 · 3 comments
Closed

[HttpKernel] Illegal Offset Type in TraceableEventDispatcher #9727

pjordaan opened this issue Dec 9, 2013 · 3 comments

Comments

@pjordaan
Copy link
pjordaan commented Dec 9, 2013

I tried to upgrade symfony to symfony 2.4. Since upgrading I get "Illegal Offset Type" on line 327 of TraceableEventDispatcher.php

It seems that during the execution of preDispatch, the value of $this->id is changed, which means $this->wrappedListeners[$this->id] is undefined

The error disappears if I do $id = $this->id; at the start of the method and use the local variable instead, but I'm not sure if this has unwanted side-effects.

@theunraveler
Copy link

+1

fabpot added a commit that referenced this issue Dec 12, 2013
…ested events (evillemez)

This PR was merged into the 2.3 branch.

Discussion
----------

allow TraceableEventDispatcher to reuse event instance in nested events

| Q                       | A
| -------------            | ---
| Bug fix?             | yes
| New feature?      | no
| BC breaks?        | no
| Deprecations?    | no
| Tests pass?       | yes
| Fixed tickets      | #9710, #9727
| License              | MIT

Commits
-------

454ce16 allow TraceableEventDispatcher to reuse event instance in nested events
@fabpot fabpot closed this as completed Dec 12, 2013
@theunraveler
Copy link

Sorry to reopen this, but the patch in d490e5a doesn't fix the issue for me. After applying that patch manually, I'm still getting the "Illegal Offset Type" on the same line of the same file mentioned above.

@theunraveler
Copy link

I should also say that the fix detailed in this issue does work (the $id = $this->id part).

fabpot added a commit that referenced this issue Feb 4, 2014
…cher (fabpot)

This PR was merged into the 2.3 branch.

Discussion
----------

[HttpKernel] fixed wrong reference in TraceableEventDispatcher

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #9748, #9727
| License       | MIT
| Doc PR        | n/a

This PR fixes #9748 and #9727 by removing the `id` state. Only private method signatures have been changed, so that qualifies for a fix in 2.3.

The `getNotCalledListeners()` is a bit special as it tries to get non-called listeners. It passes `null` as the event id as if a listener has been called more than once, getting the first call is enough.

Commits
-------

acd3317 [HttpKernel] fixed wrong reference in TraceableEventDispatcher
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
0