From 39cc3101a68b6d5a3b397db658185860ac88f83e Mon Sep 17 00:00:00 2001 From: Fred Condo Date: Thu, 24 Mar 2016 13:09:05 -0700 Subject: [PATCH] BUG: Fix infinite loop in requireDefaultRecords() Calling nextRecord() returns the first record again and again, resulting in an infinite loop. Call next() instead. --- code/model/Comment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/model/Comment.php b/code/model/Comment.php index 60491ed..0130ff6 100755 --- a/code/model/Comment.php +++ b/code/model/Comment.php @@ -132,7 +132,7 @@ class Comment extends DataObject $comments = DB::query('SELECT * FROM "PageComment"'); if ($comments) { - while ($pageComment = $comments->nextRecord()) { + while ($pageComment = $comments->next()) { // create a new comment from the older page comment $comment = new Comment(); $comment->update($pageComment);