Minor - Add validation on variable type - refs BT#11048

ofaj
Yannick Warnier 9 years ago
parent 915749b26f
commit 6deddd0301
  1. 4
      main/newscorm/lp_final_item.php

@ -83,11 +83,11 @@ if ($accessGranted == false) {
$userId
);
if (!empty($certificate['pdf_url']) || !empty($certificate['badge_link'])) {
if (isset($certificate['pdf_url'])) {
if (is_array($certificate) && isset($certificate['pdf_url'])) {
$downloadCertificateLink = generateLPFinalItemTemplateCertificateLinks($certificate);
}
if (isset($certificate['badge_link'])) {
if (is_array($certificate) && isset($certificate['badge_link'])) {
$courseId = api_get_course_int_id();
$badgeLink = generateLPFinalItemTemplateBadgeLinks($userId, $courseId, $sessionId);
}

Loading…
Cancel
Save