Skip to content

[FrameworkBundle] Fix Routing\DelegatingLoader #24304

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

Merged
merged 1 commit into from
Sep 25, 2017

Conversation

nicolas-grekas
Copy link
Member

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

Spotted while reviewing: the default controller is not always a string, so parsing should only be done conditionally.

@@ -85,7 +85,7 @@ public function load($resource, $type = null)
$this->loading = false;

foreach ($collection->all() as $route) {
if (!$controller = $route->getDefault('_controller')) {
if (!is_string($controller = $route->getDefault('_controller')) || !$controller) {
Copy link
Member

Choose a reason for hiding this comment

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

Worth a test :)

Copy link
Member Author

Choose a reason for hiding this comment

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

test added

@nicolas-grekas nicolas-grekas merged commit a69c1b2 into symfony:2.7 Sep 25, 2017
nicolas-grekas added a commit that referenced this pull request Sep 25, 2017
…ekas)

This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Fix Routing\DelegatingLoader

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

Spotted while reviewing: the default controller is not always a string, so parsing should only be done conditionally.

Commits
-------

a69c1b2 [FrameworkBundle] Fix Routing\DelegatingLoader
@nicolas-grekas nicolas-grekas deleted the fix-delegating-loader branch September 25, 2017 09:27
This was referenced Oct 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants