Skip to content

Commit 49ec1e8

Browse files
committed
[FrameworkBundle][WebProfilerBundle] Don't pass null to string parameters
Signed-off-by: Alexander M. Turek <[email protected]>
1 parent 24097c8 commit 49ec1e8

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Console/Descriptor/XmlDescriptor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ private function getContainerDefinitionDocument(Definition $definition, string $
285285
$descriptionXML->appendChild($dom->createCDATASection($classDescription));
286286
}
287287

288-
$serviceXML->setAttribute('class', $definition->getClass());
288+
$serviceXML->setAttribute('class', $definition->getClass() ?? '');
289289

290290
if ($factory = $definition->getFactory()) {
291291
$serviceXML->appendChild($factoryXML = $dom->createElement('factory'));
@@ -311,7 +311,7 @@ private function getContainerDefinitionDocument(Definition $definition, string $
311311
$serviceXML->setAttribute('abstract', $definition->isAbstract() ? 'true' : 'false');
312312
$serviceXML->setAttribute('autowired', $definition->isAutowired() ? 'true' : 'false');
313313
$serviceXML->setAttribute('autoconfigured', $definition->isAutoconfigured() ? 'true' : 'false');
314-
$serviceXML->setAttribute('file', $definition->getFile());
314+
$serviceXML->setAttribute('file', $definition->getFile() ?? '');
315315

316316
$calls = $definition->getMethodCalls();
317317
if (\count($calls) > 0) {

Tests/Kernel/ConcreteMicroKernel.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,10 @@ public function __wakeup()
7676

7777
public function __destruct()
7878
{
79-
$fs = new Filesystem();
80-
$fs->remove($this->cacheDir);
79+
if ($this->cacheDir) {
80+
$fs = new Filesystem();
81+
$fs->remove($this->cacheDir);
82+
}
8183
}
8284

8385
protected function configureRoutes(RouteCollectionBuilder $routes)

0 commit comments

Comments
 (0)