diff --git a/core/modules/comment/lib/Drupal/comment/Tests/Views/CommentTestBase.php b/core/modules/comment/lib/Drupal/comment/Tests/Views/CommentTestBase.php index 138c5d0..dabf53f 100644 --- a/core/modules/comment/lib/Drupal/comment/Tests/Views/CommentTestBase.php +++ b/core/modules/comment/lib/Drupal/comment/Tests/Views/CommentTestBase.php @@ -41,7 +41,7 @@ function setUp() { $this->drupalLogin($this->account); $this->node_user_posted = $this->drupalCreateNode(); - $this->node_user_commented = $this->drupalCreateNode(array('uid' => $this->account2->uid)); + $this->node_user_commented = $this->drupalCreateNode(array('uid' => $this->account2->id())); $comment = array( 'uid' => $this->loggedInUser->id(), diff --git a/core/modules/forum/forum.module b/core/modules/forum/forum.module index 9dd3758..617b28f 100644 --- a/core/modules/forum/forum.module +++ b/core/modules/forum/forum.module @@ -501,7 +501,7 @@ function forum_comment_delete($comment) { * Implements hook_field_storage_pre_insert(). */ function forum_field_storage_pre_insert(EntityInterface $entity, &$skip_fields) { - if ($entity->entityType() instanceof NodeInterface && $entity->isPublished() && _forum_node_check_node_type($entity)) { + if ($entity->entityType() == 'node' && $entity->isPublished() && _forum_node_check_node_type($entity)) { $query = db_insert('forum_index')->fields(array('nid', 'title', 'tid', 'sticky', 'created', 'comment_count', 'last_comment_timestamp')); foreach ($entity->getTranslationLanguages() as $langcode => $language) { $translation = $entity->getTranslation($langcode); @@ -525,7 +525,7 @@ function forum_field_storage_pre_insert(EntityInterface $entity, &$skip_fields) function forum_field_storage_pre_update(EntityInterface $entity, &$skip_fields) { $first_call = &drupal_static(__FUNCTION__, array()); - if ($entity instanceof NodeInterface && _forum_node_check_node_type($entity)) { + if ($entity->entityType() == 'node' && _forum_node_check_node_type($entity)) { // If the node is published, update the forum index. if ($entity->isPublished()) {