diff --git a/CHANGELOG.md b/CHANGELOG.md index 988ac0a816..61e4eb42a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ HumHub Changelog - Fix #5735: OEmbed migration might fail with more complex Endpoint URLs - Fix #5760: Fix context menu position on the right window side - Fix #5759: Fix tests on enable space module +- Fix #5773: Fix PHP 8 incompatibility with conversion false to array 1.11.2 (May 30, 2022) diff --git a/protected/humhub/modules/comment/models/Comment.php b/protected/humhub/modules/comment/models/Comment.php index 89ec84df35..f9466998d5 100644 --- a/protected/humhub/modules/comment/models/Comment.php +++ b/protected/humhub/modules/comment/models/Comment.php @@ -222,6 +222,9 @@ class Comment extends ContentAddonActiveRecord implements ContentOwner $cacheID = sprintf(static::CACHE_KEY_LIMITED, $model, $id); $comments = $useCaching ? Yii::$app->cache->get($cacheID) : []; + if (!is_array($comments)) { + $comments = []; + } if (!isset($comments[$limit]) || !is_array($comments[$limit])) { $objectCondition = ['object_model' => $model, 'object_id' => $id];