-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue #65: fix: DB error - Linkid variable string numeric value checked #69
Conversation
3882ea1
to
2d7ad10
Compare
2d7ad10
to
c73e696
Compare
c73e696
to
b1198ef
Compare
@@ -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)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about comparison reported in the issue? Should we also fix its logic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I think the right spot for fixing it should be acknowledged_notice::other_cols.
The current method should be fixed if it would have a type hint for $linkid. And it will get one at some point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have created #70
Would be fixed as part of #81 Closing this one off |
This PR fixes issues #65,
Regards,
Marc-Alexandre