diff --git a/lib/private/Tags.php b/lib/private/Tags.php index 3426a5a2ee8f9..37462a42ab9e6 100644 --- a/lib/private/Tags.php +++ b/lib/private/Tags.php @@ -314,8 +314,8 @@ public function add(string $name) { ]); return false; } - $this->logger->debug(__METHOD__ . ' Added an tag with ' . $tag->getId(), ['app' => 'core']); - return $tag->getId(); + $this->logger->debug(__METHOD__ . ' Added an tag with ' . ($tag->getId() ?? ''), ['app' => 'core']); + return $tag->getId() ?? false; } /**