Skip to content

Commit

Permalink
PODB-603: Protect against client ID being null.
Browse files Browse the repository at this point in the history
  • Loading branch information
lin-brian-l committed Jul 20, 2022
1 parent 1c7ac41 commit de328e5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/LtiMessageLaunch.php
Original file line number Diff line number Diff line change
Expand Up @@ -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];

Expand Down

0 comments on commit de328e5

Please sign in to comment.