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 7a08b52

Browse filesBrowse files
committed
[Console] Fix deprecation when description is null
str_replace(): Passing null to parameter symfony#3 ($subject) of type array|string is deprecated
1 parent 8d0d9fa commit 7a08b52
Copy full SHA for 7a08b52

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎src/Symfony/Component/Console/DependencyInjection/AddConsoleCommandPass.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/DependencyInjection/AddConsoleCommandPass.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public function process(ContainerBuilder $container)
124124
if (!$r->isSubclassOf(Command::class)) {
125125
throw new InvalidArgumentException(sprintf('The service "%s" tagged "%s" must be a subclass of "%s".', $id, $this->commandTag, Command::class));
126126
}
127-
$description = str_replace('%', '%%', $class::getDefaultDescription());
127+
$description = str_replace('%', '%%', $class::getDefaultDescription() ?? '');
128128
}
129129

130130
if ($description) {

0 commit comments

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