diff --git a/src/LtiMessageLaunch.php b/src/LtiMessageLaunch.php index ff816b64..b34d580a 100644 --- a/src/LtiMessageLaunch.php +++ b/src/LtiMessageLaunch.php @@ -283,8 +283,13 @@ public function getLaunchId() return $this->launch_id; } - public static function getMissingRegistrationErrorMsg(string $issuerUrl, string $clientId): string + public static function getMissingRegistrationErrorMsg(string $issuerUrl, ?string $clientId = null): string { + // Guard against client ID being null + if (!isset($clientId)) { + $clientId = '(N/A)'; + } + $search = [':issuerUrl', ':clientId']; $replace = [$issuerUrl, $clientId];