diff --git a/Events.php b/Events.php index 1b8f771..610f93f 100644 --- a/Events.php +++ b/Events.php @@ -72,7 +72,7 @@ public static function onIntegrityCheck($event) { $integrityController = $event->sender; $integrityController->showTestHeadline("Polls Module - Answers (" . PollAnswer::find()->count() . " entries)"); - foreach (PollAnswer::find()->joinWith('poll')->all() as $answer) { + foreach (PollAnswer::find()->joinWith('poll')->each() as $answer) { if ($answer->poll === null) { if ($integrityController->showFix("Deleting poll answer id " . $answer->id . " without existing poll!")) { $answer->delete(); @@ -81,7 +81,7 @@ public static function onIntegrityCheck($event) } $integrityController->showTestHeadline("Polls Module - Answers User (" . PollAnswerUser::find()->count() . " entries)"); - foreach (PollAnswerUser::find()->joinWith(['poll', 'user'])->all() as $answerUser) { + foreach (PollAnswerUser::find()->joinWith(['poll', 'user'])->each() as $answerUser) { if ($answerUser->poll === null) { if ($integrityController->showFix("Deleting poll answer id " . $answerUser->id . " without existing poll!")) { $answerUser->delete(); diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index daa82ce..de7ad3b 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,6 +1,10 @@ Changelog ========= +1.3.5 (Unreleased) +---------------------- +- Fix #129: Fix memory usage on integrity check + 1.3.4 (November, 10, 2023) -------------------------- - Enh #127: Tests for `next` version diff --git a/module.json b/module.json index 72ed5a6..5ee9cce 100644 --- a/module.json +++ b/module.json @@ -3,7 +3,7 @@ "name": "Polls", "description": "Empower your users to create polls and survey to drive engagement and gather valuable insights from your community.", "keywords": ["poll", "voting", "decision making"], - "version": "1.3.4", + "version": "1.3.5", "humhub": { "minVersion": "1.14" },