1
0
mirror of https://github.com/silverstripe/silverstripe-comments synced 2024-10-22 11:05:49 +02:00

Merge pull request from oddnoc/patch-1

BUG: Fix infinite loop in requireDefaultRecords()
This commit is contained in:
Damian Mooyman 2016-03-31 17:49:44 +13:00
commit 9f527ef54d

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