diff --git a/includes/CommentParser.php b/includes/CommentParser.php index 59049cc4d..b630c71c8 100644 --- a/includes/CommentParser.php +++ b/includes/CommentParser.php @@ -1149,7 +1149,7 @@ class CommentParser { if ( isset( $this->threadItemsById[$id] ) ) { // Well, that's tough - $threadItem->addWarning( 'Duplicate comment ID' ); + $threadItem->addWarning( 'Duplicate comment legacy ID' ); // Finally, disambiguate by adding sequential numbers, to allow replying to both comments $number = 1; while ( isset( $this->threadItemsById["$id|$number"] ) ) { diff --git a/tests/phpunit/CommentParserTest.php b/tests/phpunit/CommentParserTest.php index 2703194f1..79e498d31 100644 --- a/tests/phpunit/CommentParserTest.php +++ b/tests/phpunit/CommentParserTest.php @@ -89,6 +89,8 @@ class CommentParserTest extends IntegrationTestCase { $serialized->id = $threadItem->getId(); $serialized->warnings = $threadItem->getWarnings(); + // Ignore warnings about legacy IDs (we don't have them in JS) + $serialized->warnings = array_values( array_diff( $serialized->warnings, [ 'Duplicate comment legacy ID' ] ) ); $serialized->replies = []; foreach ( $threadItem->getReplies() as $reply ) {