8000 RequestDataCollector error after login · Issue #19701 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

RequestDataCollector error after login #19701

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
poolerMF opened this issue Aug 22, 2016 · 6 comments
Closed

RequestDataCollector error after login #19701

poolerMF opened this issue Aug 22, 2016 · 6 comments

Comments

@poolerMF
Copy link

after upgrading SF to version 3.1.3 I'm getting error after login

Notice: Array to string conversion
RequestDataCollector.php at line 378

when I dump $controller in RequestDataCollector->parseController at first line in function:

error

@jakzal
Copy link
Contributor
jakzal commented Aug 22, 2016

@poolerMF are you use you haven't modified the RequestDataCollector? v3.1.3 has a closing brace on line 378.

Can you check what's going on earlier in the parseController method where it uses reflection with the array elements. This code might throw an exception. The only scenario I can see that it reaches the end of the method with an array is when is_callable returns false while handling that exception.

@poolerMF
Copy link
Author
poolerMF commented Aug 22, 2016
8000

@jakzal sorry, it's at line 378 after I applied dump ... so original error is at line 378

I figured out where was the error ... I didn't have method loginCheckAction in SecurityController
In latest SF version it worked without this method ...

I think in my situation it should throw 500 Internal Server Error with message:

The controller for URI "/?????" is not callable. Expected method "loginCheckAction"
on class "......\SecurityController" ... 

@jakzal
Copy link
Contributor
jakzal commented Aug 25, 2016

@poolerMF I know what seems to be causing your problem but cannot reproduce it. Do you think you could isolate your problem in a fresh installation of Symfony?

@xabbuh
Copy link
Member
xabbuh commented Sep 27, 2016

ping @poolerMF Any news on this? :)

@poolerMF
Copy link
Author

@xabbuh I reproduce project with error:
https://github.com/poolerMF/SF_19701

try to make login and you will see error ... uncomment some lines in SecurityController and everything will work

In latest SF version it worked without method loginCheckAction

I think, it should throw this exception:

The controller for URI "/?????" is not callable. Expected method "loginCheckAction"
on class "......\SecurityController" ... 

instead of this:

Array to string conversion

@jakzal
Copy link
Contributor
jakzal commented Oct 18, 2016

@poolerMF thanks to your work I was able to reproduce and fix the issue 🍺

fabpot added a commit that referenced this issue Oct 22, 2016
…(jakzal)

This PR was merged into the 3.1 branch.

Discussion
----------

[HttpKernel] Fix a regression in the RequestDataCollector

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

The regression was introduced by refactoring made as part of #17589 (if/else statements where rearranged).

Commits
-------

57008ea [HttpKernel] Fix a regression in the RequestDataCollector
26b90e4 [HttpKernel] Refactor a RequestDataCollector test case to use a data provider
@fabpot fabpot closed this as completed Oct 22, 2016
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

6 participants
0