BUG: Fix infinite loop in requireDefaultRecords()

Calling nextRecord() returns the first record again and again, resulting in an infinite loop. Call next() instead.
This commit is contained in:
Fred Condo 2016-03-24 13:09:05 -07:00
parent bb0de16f36
commit 39cc3101a6

View File

@ -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);