From b9eab4282315f0af0dcf56c0d054f9d97c4d9182 Mon Sep 17 00:00:00 2001 From: Mateusz Lerczak Date: Wed, 12 Jun 2019 12:36:09 +0200 Subject: [PATCH] Add statement to fileLink to ignore href code when no fileLink. --- .../FrameworkBundle/Console/Descriptor/TextDescriptor.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php index 323f9ae250..796beaee01 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php @@ -557,8 +557,11 @@ class TextDescriptor extends Descriptor } $fileLink = $this->fileLinkFormatter->format($r->getFileName(), $r->getStartLine()); + if ($fileLink) { + return sprintf('%s', $fileLink, $anchorText); + } - return sprintf('%s', $fileLink, $anchorText); + return $anchorText; } private function formatCallable($callable): string