Skip to content

Commit

Permalink
Add int casting
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed May 13, 2021
1 parent 0adea3a commit 36149c1
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion main/plagiarism/compilatio/upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,16 @@

function sendDocument($documentId, $courseInfo)
{
$courseId = $courseInfo['real_id'];
if (empty($courseInfo)) {
return false;
}

$courseId = $courseInfo['real_id'] ?? 0;
$documentId = (int) $documentId;

if (empty($courseId) || empty($documentId)) {
return false;
}

compilatioUpdateWorkDocument($documentId, $courseId);
$workTable = Database::get_course_table(TABLE_STUDENT_PUBLICATION);
Expand Down

0 comments on commit 36149c1

Please sign in to comment.