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

Cannot use a callable in _controller request attribute #23456

Closed
alekitto opened this issue Jul 8, 2017 · 0 comments
Closed

Cannot use a callable in _controller request attribute #23456

alekitto opened this issue Jul 8, 2017 · 0 comments

Comments

@alekitto
Copy link
Contributor

alekitto commented Jul 8, 2017

Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Symfony version 3.3.4

ResolveControllerNameSubscriber is not checking for the _controller request attribute to be a string. If a callable (or a closure) is set, it will raise the following error:

strpos() expects parameter 1 to be string, array given
nicolas-grekas added a commit that referenced this issue Jul 11, 2017
…before parsing it (alekitto)

This PR was merged into the 3.3 branch.

Discussion
----------

[FrameworkBundle] check _controller attribute is a string before parsing it

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #23456
| License       | MIT

Avoids an error to be raised in case described in issue #23456.

Commits
-------

0b349ae check _controller attribute is a string before parsing it
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

No branches or pull requests

2 participants