diff --git a/endpoints/comment/downvote-reply.php b/endpoints/comment/downvote-reply.php index 541a0d9b..9637bdc3 100644 --- a/endpoints/comment/downvote-reply.php +++ b/endpoints/comment/downvote-reply.php @@ -47,7 +47,7 @@ class CommentDownvotereplyResponse extends TextResponse User::canSupervote() ? -2 : -1 ); - if (!$ok) + if (!is_int($ok)) { trigger_error('CommentDownvotereplyResponse - write to db failed', E_USER_ERROR); $this->generate404(User::isInGroup(U_GROUP_STAFF) ? 'write to db failed' : ''); diff --git a/endpoints/comment/upvote-reply.php b/endpoints/comment/upvote-reply.php index d40b5b75..91fedf47 100644 --- a/endpoints/comment/upvote-reply.php +++ b/endpoints/comment/upvote-reply.php @@ -47,7 +47,7 @@ class CommentUpvotereplyResponse extends TextResponse User::canSupervote() ? 2 : 1 ); - if (!$ok) + if (!is_int($ok)) { trigger_error('CommentUpvotereplyResponse - write to db failed', E_USER_ERROR); $this->generate404(User::isInGroup(U_GROUP_STAFF) ? 'write to db failed' : '');