8000 fixed "using $this when not in object context" error by craue · Pull Request #2353 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

fixed "using $this when not in object context" error #2353

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
wants to merge 1 commit into from

Conversation

craue
Copy link
Contributor
@craue craue commented Oct 8, 2011

No description provided.

@fabpot
Copy link
Member
fabpot commented Oct 8, 2011

This is a fix that needs to be done on the 2.0 branch. Can you close this PR and open a new one on 2.0? thanks

@Abhoryo
Copy link
Abhoryo commented Oct 8, 2011

Why not use it everywhere in the method?
$this-container or $container.

@craue
Copy link
Contributor Author
craue commented Oct 8, 2011

@fabpot: Alright. I'll do that.

@Abhoryo: The closure has it's own context, thus you explicitly have to pass variables you want to access.

@craue craue closed this Oct 8, 2011
craue added a commit to craue/symfony that referenced this pull request Oct 8, 2011
fabpot added a commit that referenced this pull request Oct 8, 2011
Commits
-------

2e5869d fixed "using $this when not in object context" error for 2.0 branch (replaces #2353)

Discussion
----------

fixed "using $this when not in object context" error for 2.0 branch (replaces #2353)
@Abhoryo
Copy link
Abhoryo commented Oct 8, 2011

I'd not seen the function.

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
0