From e3332ada974ae4cc3af3c17fab63371ee14e6ae1 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 29 Dec 2024 17:08:18 +0100 Subject: [PATCH] Remove `null` values from the runtime cache See https://www.woltlab.com/community/thread/310416/ --- .../event/TCommentResponseUserActivityEvent.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/lib/system/user/activity/event/TCommentResponseUserActivityEvent.class.php b/wcfsetup/install/files/lib/system/user/activity/event/TCommentResponseUserActivityEvent.class.php index 0e1cd435ec..ab980c506c 100644 --- a/wcfsetup/install/files/lib/system/user/activity/event/TCommentResponseUserActivityEvent.class.php +++ b/wcfsetup/install/files/lib/system/user/activity/event/TCommentResponseUserActivityEvent.class.php @@ -57,7 +57,7 @@ trait TCommentResponseUserActivityEvent $responseIDs[] = $event->objectID; } - $this->responses = ViewableCommentResponseRuntimeCache::getInstance()->getObjects($responseIDs); + $this->responses = \array_filter(ViewableCommentResponseRuntimeCache::getInstance()->getObjects($responseIDs)); $commentIDs = []; foreach ($this->responses as $response) { @@ -65,7 +65,7 @@ trait TCommentResponseUserActivityEvent } if (!empty($commentIDs)) { - $this->comments = ViewableCommentRuntimeCache::getInstance()->getObjects($commentIDs); + $this->comments = \array_filter(ViewableCommentRuntimeCache::getInstance()->getObjects($commentIDs)); } $userIDs = []; @@ -74,7 +74,7 @@ trait TCommentResponseUserActivityEvent $this->commentObjectIDs[] = $comment->objectID; } if (!empty($userIDs)) { - $this->commentAuthors = UserProfileRuntimeCache::getInstance()->getObjects($userIDs); + $this->commentAuthors = \array_filter(UserProfileRuntimeCache::getInstance()->getObjects($userIDs)); } } } -- 2.20.1