Skip to content

Commit 367c209

Browse files
committed
Merge branch '4.4' into 5.2
* 4.4: Fix incompatible implicit float-to-int conversions [Translation] Don't pass null to strtoupper() cs fix [DependencyInjection] Don't pass null to trim() Add return types to JsonSerializable implementations Fix Serializable deprecations triggered by token mocks Add missing security translations
2 parents a719718 + e7aa9f3 commit 367c209

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Dumper/PhpDumper.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2224,7 +2224,9 @@ private function getClasses(Definition $definition, string $id): array
22242224
$classes[] = trim($tag['class'], '\\');
22252225
}
22262226

2227-
$classes[] = trim($definition->getClass(), '\\');
2227+
if ($class = $definition->getClass()) {
2228+
$classes[] = trim($class, '\\');
2229+
}
22282230
$factory = $definition->getFactory();
22292231

22302232
if (!\is_array($factory)) {
@@ -2241,6 +2243,6 @@ private function getClasses(Definition $definition, string $id): array
22412243
$definition = $factory[0];
22422244
}
22432245

2244-
return array_filter($classes);
2246+
return $classes;
22452247
}
22462248
}

0 commit comments

Comments
 (0)