From 6f6e3ce98a6c88125924c9ab218c1de7eb038cba Mon Sep 17 00:00:00 2001 From: catch Date: Fri, 8 Oct 2021 13:42:34 +0100 Subject: [PATCH] Issue #3241268 by alexpott, daffie: core/modules/node/tests/modules/node_test/node_test.module cause deprecations on PHP 8.1 --- core/modules/node/tests/modules/node_test/node_test.module | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/modules/node/tests/modules/node_test/node_test.module b/core/modules/node/tests/modules/node_test/node_test.module index 4054362e456..b62138d1eac 100644 --- a/core/modules/node/tests/modules/node_test/node_test.module +++ b/core/modules/node/tests/modules/node_test/node_test.module @@ -18,6 +18,9 @@ use Drupal\node\NodeInterface; * Implements hook_ENTITY_TYPE_view() for node entities. */ function node_test_node_view(array &$build, NodeInterface $node, EntityViewDisplayInterface $display, $view_mode) { + if ($node->isNew()) { + return; + } if ($view_mode == 'rss') { // Add RSS elements and namespaces when building the RSS feed. $node->rss_elements[] = [