diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module index 5690c72..55c264a 100644 --- a/core/modules/comment/comment.module +++ b/core/modules/comment/comment.module @@ -1362,8 +1362,7 @@ function comment_delete_multiple($cids) { * @param array $cids * (optional) An array of entity IDs. If omitted, all entities are loaded. * @param bool $reset - * Whether to reset the internal static entity cache. Note that the static - * cache is disabled by default. + * (optional) Whether to reset the internal static entity cache. * * @return array * An array of comment objects, indexed by comment ID. @@ -1381,14 +1380,13 @@ function comment_load_multiple(array $cids = NULL, $reset = FALSE) { * @param int $cid * The ID of the comment to be loaded. * @param bool $reset - * Whether to reset the internal static entity cache. Note that the static - * cache is disabled by default. + * (optional) Whether to reset the internal static entity cache. * * @return * The comment object. */ function comment_load($cid, $reset = FALSE) { - return entity_load('comment', $cid); + return entity_load('comment', $cid, $reset); } /** diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/Core/Entity/Comment.php b/core/modules/comment/lib/Drupal/comment/Plugin/Core/Entity/Comment.php index b57c74f..68bb7dc 100644 --- a/core/modules/comment/lib/Drupal/comment/Plugin/Core/Entity/Comment.php +++ b/core/modules/comment/lib/Drupal/comment/Plugin/Core/Entity/Comment.php @@ -33,7 +33,6 @@ * uri_callback = "comment_uri", * fieldable = TRUE, * translatable = TRUE, - * static_cache = FALSE, * entity_keys = { * "id" = "cid", * "bundle" = "node_type", diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentTestBase.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentTestBase.php index c023c56..fe4a11c 100644 --- a/core/modules/comment/lib/Drupal/comment/Tests/CommentTestBase.php +++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentTestBase.php @@ -146,7 +146,7 @@ function postComment($node, $comment, $subject = '', $contact = NULL) { } if (isset($match[1])) { - $entity = comment_load($match[1]); + $entity = comment_load($match[1], TRUE); return $entity; } } diff --git a/core/modules/user/lib/Drupal/user/Tests/UserCancelTest.php b/core/modules/user/lib/Drupal/user/Tests/UserCancelTest.php index 70623bd..0411a10 100644 --- a/core/modules/user/lib/Drupal/user/Tests/UserCancelTest.php +++ b/core/modules/user/lib/Drupal/user/Tests/UserCancelTest.php @@ -327,7 +327,7 @@ function testUserDelete() { $this->assertFalse(node_load($node->nid, TRUE), 'Node of the user has been deleted.'); $this->assertFalse(node_revision_load($revision), 'Node revision of the user has been deleted.'); $this->assertTrue(node_load($revision_node->nid, TRUE), "Current revision of the user's node was not deleted."); - $this->assertFalse(comment_load($comment->id()), 'Comment of the user has been deleted.'); + $this->assertFalse(comment_load($comment->id(), TRUE), 'Comment of the user has been deleted.'); // Confirm that user is logged out. $this->assertNoText($account->name, 'Logged out.');