diff --git a/core/modules/node/src/NodeForm.php b/core/modules/node/src/NodeForm.php index 0c5bbc691639..f15b77e69e2d 100644 --- a/core/modules/node/src/NodeForm.php +++ b/core/modules/node/src/NodeForm.php @@ -300,7 +300,7 @@ class NodeForm extends ContentEntityForm { } // Validate the "authored by" field. - if (!empty($form_state['values']['uid']) && !($account = user_load_by_name($form_state['values']['uid']))) { + if (!empty($form_state['values']['uid']) && !user_load_by_name($form_state['values']['uid'])) { // The use of empty() is mandatory in the context of usernames // as the empty string denotes the anonymous user. In case we // are dealing with an anonymous user we set the user ID to 0. diff --git a/core/modules/node/src/Tests/NodeSaveTest.php b/core/modules/node/src/Tests/NodeSaveTest.php index 5164ecf19fd1..0377705ba2df 100644 --- a/core/modules/node/src/Tests/NodeSaveTest.php +++ b/core/modules/node/src/Tests/NodeSaveTest.php @@ -90,7 +90,6 @@ class NodeSaveTest extends NodeTestBase { // Store the timestamps. $created = $node->getCreatedTime(); - $changed = $node->getChangedTime(); $node->save(); $node = $this->drupalGetNodeByTitle($edit['title'], TRUE); diff --git a/core/modules/node/src/Tests/NodeTypePersistenceTest.php b/core/modules/node/src/Tests/NodeTypePersistenceTest.php index 66ea769e5c10..1dd4c9652ad3 100644 --- a/core/modules/node/src/Tests/NodeTypePersistenceTest.php +++ b/core/modules/node/src/Tests/NodeTypePersistenceTest.php @@ -29,7 +29,6 @@ class NodeTypePersistenceTest extends NodeTestBase { $this->drupalLogin($web_user); $forum_key = 'modules[Core][forum][enable]'; $forum_enable = array($forum_key => "1"); - $forum_disable = array($forum_key => FALSE); // Enable forum and verify that the node type exists and is not disabled. $this->drupalPostForm('admin/modules', $forum_enable, t('Save configuration'));