Skip to content

Commit

Permalink
Issue #65: fix: DB error - Linkid variable string numeric value checked
Browse files Browse the repository at this point in the history
  • Loading branch information
marcghaly committed Dec 19, 2023
1 parent af775ba commit 7b69053
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/persistent/linkhistory.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public static function delete_link_history($linkids) {
public static function count_clicked_links($userid, $noticeid, $linkid = 0) {
global $DB;
$params = [];
if ($linkid > 0) {
if ($linkid > 0 && is_numeric($linkid)) {
$wheresql = "WHERE h.userid = :userid AND l.noticeid = :noticeid AND h.hlinkid = :hlinkid";
$params = ['hlinkid' => $linkid];
} else {
Expand Down

0 comments on commit 7b69053

Please sign in to comment.