Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5af6eda

Browse filesBrowse files
committed
[FrameworkBundle][WebProfilerBundle] Don't pass null to string parameters
Signed-off-by: Alexander M. Turek <me@derrabus.de>
1 parent b87de42 commit 5af6eda
Copy full SHA for 5af6eda

File tree

Expand file treeCollapse file tree

3 files changed

+7
-5
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+7
-5
lines changed

‎src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php
+2-2Lines 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) {

‎src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/ConcreteMicroKernel.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/ConcreteMicroKernel.php
+4-2Lines 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)

‎src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function onKernelResponse(FilterResponseEvent $event)
103103
|| $response->isRedirection()
104104
|| ($response->headers->has('Content-Type') && false === strpos($response->headers->get('Content-Type'), 'html'))
105105
|| 'html' !== $request->getRequestFormat()
106-
|| false !== stripos($response->headers->get('Content-Disposition'), 'attachment;')
106+
|| false !== stripos($response->headers->get('Content-Disposition', ''), 'attachment;')
107107
) {
108108
return;
109109
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.