1
0
Fork 0

don't return a single space for packages without descriptions (#12162)

pull/12176/head
Christian Flothmann 2024-10-19 22:15:13 +02:00 committed by GitHub
parent 787f503616
commit 0191d0c7c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -649,7 +649,7 @@ class Problem
$providers = $repositorySet->getProviders($packageName);
if (\count($providers) > 0) {
$providersStr = implode(array_map(static function ($p): string {
$description = $p['description'] !== '' ? ' '.substr($p['description'] ?? '', 0, 100) : '';
$description = $p['description'] !== '' && $p['description'] !== null ? ' '.substr($p['description'], 0, 100) : '';
return ' - '.$p['name'].$description."\n";
}, count($providers) > $maxProviders + 1 ? array_slice($providers, 0, $maxProviders) : $providers));