Skip to content

Commit 8196eb8

Browse files
committed
LP: Add int casting
1 parent ee755bd commit 8196eb8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: main/inc/lib/document.lib.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -3613,7 +3613,7 @@ public static function get_document_preview(
36133613
</script>";
36143614
} else {
36153615
// For LPs
3616-
$url = $lpAjaxUrl.'?a=get_documents&lp_id='.$lp_id.'&'.api_get_cidreq();
3616+
$url = $lpAjaxUrl.'?a=get_documents&lp_id='.(int) $lp_id.'&'.api_get_cidreq();
36173617
}
36183618

36193619
if (!empty($overwrite_url)) {
@@ -7018,7 +7018,8 @@ private static function parseFile(
70187018
// Show the "image name" not the filename of the image.
70197019
if ($lp_id) {
70207020
// LP URL
7021-
$url = api_get_path(WEB_CODE_PATH).'lp/lp_controller.php?'.api_get_cidreq().'&action=add_item&type='.TOOL_DOCUMENT.'&file='.$documentId.'&lp_id='.$lp_id;
7021+
$url = api_get_path(WEB_CODE_PATH).
7022+
'lp/lp_controller.php?'.api_get_cidreq().'&action=add_item&type='.TOOL_DOCUMENT.'&file='.$documentId.'&lp_id='.(int) $lp_id;
70227023
} else {
70237024
// Direct document URL
70247025
$url = $web_code_path.'document/document.php?cidReq='.$courseInfo['code'].'&id_session='.$session_id.'&id='.$documentId;

0 commit comments

Comments
 (0)