diff --git a/src/EventListener/DataContainer/ShortlinkLabelListener.php b/src/EventListener/DataContainer/ShortlinkLabelListener.php index a50e5cd..a9dc26d 100644 --- a/src/EventListener/DataContainer/ShortlinkLabelListener.php +++ b/src/EventListener/DataContainer/ShortlinkLabelListener.php @@ -39,12 +39,14 @@ public function __invoke(array $row, string $label, DataContainer $dc, array $co break; case 'target': - $targetUrl = $this->generator->generateTargetUrl($row['target']); - $columns[$k] = sprintf( - '%s', - $targetUrl, - $row['name'] ?: $targetUrl, - ); + if ($row['target']) { + $targetUrl = $this->generator->generateTargetUrl($row['target']); + $columns[$k] = sprintf( + '%s', + $targetUrl, + $row['name'] ?: $targetUrl, + ); + } break; case 'log':