From 6d27e3d0f8f546d55f9759d8b5f64742b0ca8549 Mon Sep 17 00:00:00 2001 From: Markus Klein Date: Thu, 8 Oct 2020 16:52:43 +0200 Subject: [PATCH] [BUGFIX] Correct link building Resolves: #3 --- src/Verification/Link.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Verification/Link.php b/src/Verification/Link.php index 988c69f..a73a9d8 100644 --- a/src/Verification/Link.php +++ b/src/Verification/Link.php @@ -99,7 +99,7 @@ class Link throw new \InvalidArgumentException('No ID provided.', 1599723825); } - $link = $this->settings->getMySkillDisplayUrl() . '/skillup/' . $type . '/' . $id . '/0/' . ($campaignId ?: ''); + $link = $this->settings->getMySkillDisplayUrl() . '/skillup/' . $type . '/' . $id . '/0/'; switch ($vtype) { case VERIFICATION_EDUCATIONAL: $link .= '2'; @@ -114,6 +114,9 @@ class Link $link .= '3'; break; } + if ($campaignId) { + $link .= '/' . $campaignId; + } return $link; }