From: Alexander Ebert Date: Sun, 16 Feb 2020 17:06:29 +0000 (+0100) Subject: Incorrect usage of `NOT IN()` for columns that accept `NULL` X-Git-Tag: 5.2.3~23 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2b74e47abbed6c0637ed4aca19689e1c3871ca7e;p=GitHub%2FWoltLab%2FWCF.git Incorrect usage of `NOT IN()` for columns that accept `NULL` `NULL` is considered to fail the condition `NOT IN (1, 2, …)`. --- diff --git a/wcfsetup/install/files/lib/system/box/AbstractCommentListBoxController.class.php b/wcfsetup/install/files/lib/system/box/AbstractCommentListBoxController.class.php index ce1eb865e7..cd4a0f60c6 100644 --- a/wcfsetup/install/files/lib/system/box/AbstractCommentListBoxController.class.php +++ b/wcfsetup/install/files/lib/system/box/AbstractCommentListBoxController.class.php @@ -86,7 +86,7 @@ abstract class AbstractCommentListBoxController extends AbstractDatabaseObjectLi $this->applyObjectTypeFilters($commentList); if (!empty(UserProfileHandler::getInstance()->getIgnoredUsers())) { - $commentList->getConditionBuilder()->add("comment.userID NOT IN (?)", [UserProfileHandler::getInstance()->getIgnoredUsers()]); + $commentList->getConditionBuilder()->add("(comment.userID IS NULL OR comment.userID NOT IN (?))", [UserProfileHandler::getInstance()->getIgnoredUsers()]); } return $commentList;