From: Alexander Ebert Date: Sun, 29 Dec 2024 16:08:18 +0000 (+0100) Subject: Remove `null` values from the runtime cache X-Git-Tag: 6.1.3_dev_2~7 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e3332ada974ae4cc3af3c17fab63371ee14e6ae1;p=GitHub%2FWoltLab%2FWCF.git Remove `null` values from the runtime cache See https://www.woltlab.com/community/thread/310416/ --- 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)); } } }