Issue #2064639 by rahul.shinde, InternetDevels, martin107, longwave, jayeshanandani, connork, CarlHinton, vlad.n, superspring, andrei.dincu, stevepurkiss, jlindsey15, Salah Messaoud: Fixed Remove unused local variables from the node module.
parent
fa47d45002
commit
5417fcfdcf
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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'));
|
||||
|
|
Loading…
Reference in New Issue