Skip to content

[DependencyInjection] Don't pass null to trim() #41557

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
Jun 6, 2021

Conversation

derrabus
Copy link
Member

@derrabus derrabus commented Jun 5, 2021

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Part of #41552
License MIT
Doc PR N/A

@@ -2147,7 +2147,9 @@ private function getClasses(Definition $definition): array
$classes = [];

while ($definition instanceof Definition) {
$classes[] = trim($definition->getClass(), '\\');
if ($class = $definition->getClass()) {
$classes[] = trim($class, '\\');
Copy link
Member

Choose a reason for hiding this comment

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

maybe we can now remove array_filter($classes) at line 2169?

Copy link
Member Author

Choose a reason for hiding this comment

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

The array_filter would still remove empty strings. I don't know if that's a thing here.

Copy link
Member

Choose a reason for hiding this comment

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

removed in 40992f0 as I don't think the empty can get in (or if it does, that's because of a broken factory definition anyway)

@nicolas-grekas
Copy link
Member

Thank you @derrabus.

@nicolas-grekas nicolas-grekas merged commit fec859a into symfony:4.4 Jun 6, 2021
@derrabus derrabus deleted the bugfix/phpdumper-trim branch June 6, 2021 08:43
@derrabus derrabus mentioned this pull request Jun 6, 2021
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.

5 participants