diff --git a/core/modules/comment/src/Plugin/migrate/source/d6/CommentVariablePerCommentType.php b/core/modules/comment/src/Plugin/migrate/source/d6/CommentVariablePerCommentType.php index ea987be9242de7460558db144deab7397aa7532a..5d16ed0297f069b33ffce78ad9bbd37b3b4e1b87 100644 --- a/core/modules/comment/src/Plugin/migrate/source/d6/CommentVariablePerCommentType.php +++ b/core/modules/comment/src/Plugin/migrate/source/d6/CommentVariablePerCommentType.php @@ -20,7 +20,7 @@ protected function getCommentVariables() { $return = array(); foreach ($node_types as $node_type => $data) { // Only 2 comment types depending on subject field visibility. - if (empty($data['comment_subject_field'])) { + if (!empty($data['comment_subject_field'])) { // Default label and description should be set in migration. $return['comment'] = array( 'comment_type' => 'comment', diff --git a/core/modules/comment/tests/src/Unit/Migrate/d6/CommentVariablePerCommentTypeTest.php b/core/modules/comment/tests/src/Unit/Migrate/d6/CommentVariablePerCommentTypeTest.php index 0055a2ca8babad00b6421bb166ebef7c9b9ef866..75d0932a998aceb2301919af5afee7c75715a017 100644 --- a/core/modules/comment/tests/src/Unit/Migrate/d6/CommentVariablePerCommentTypeTest.php +++ b/core/modules/comment/tests/src/Unit/Migrate/d6/CommentVariablePerCommentTypeTest.php @@ -24,10 +24,10 @@ class CommentVariablePerCommentTypeTest extends MigrateSqlSourceTestCase { // Each result will also include a label and description, but those are // static values set by the source plugin and don't need to be asserted. array( - 'comment_type' => 'comment_no_subject', + 'comment_type' => 'comment', ), array( - 'comment_type' => 'comment', + 'comment_type' => 'comment_no_subject', ), );