diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/VocabularyPermissionsTest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/VocabularyPermissionsTest.php index 941d6e8..a863e98 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/VocabularyPermissionsTest.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/VocabularyPermissionsTest.php @@ -80,7 +80,7 @@ function testVocabularyPermissionsTaxonomyTerm() { // Edit the term. $this->drupalGet('taxonomy/term/' . $term->id() . '/edit'); $this->assertResponse(200); - $this->assertText($term->name, 'Edit taxonomy term form opened successfully.'); + $this->assertText($term->name->value, 'Edit taxonomy term form opened successfully.'); $edit['name'] = $this->randomName(); $this->drupalPost(NULL, $edit, t('Save')); @@ -107,11 +107,11 @@ function testVocabularyPermissionsTaxonomyTerm() { // Delete the vocabulary. $this->drupalGet('taxonomy/term/' . $term->id() . '/delete'); - $this->assertRaw(t('Are you sure you want to delete the term %name?', array('%name' => $term->name)), 'Delete taxonomy term form opened successfully.'); + $this->assertRaw(t('Are you sure you want to delete the term %name?', array('%name' => $term->label())), 'Delete taxonomy term form opened successfully.'); // Confirm deletion. $this->drupalPost(NULL, NULL, t('Delete')); - $this->assertRaw(t('Deleted term %name.', array('%name' => $term->name)), 'Term deleted.'); + $this->assertRaw(t('Deleted term %name.', array('%name' => $term->label())), 'Term deleted.'); // Test as user without proper permissions. $user = $this->drupalCreateUser(); diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module index 17f2364..b4eb8e5 100644 --- a/core/modules/taxonomy/taxonomy.module +++ b/core/modules/taxonomy/taxonomy.module @@ -449,7 +449,7 @@ function taxonomy_check_vocabulary_hierarchy(Vocabulary $vocabulary, $changed_te $hierarchy = TAXONOMY_HIERARCHY_DISABLED; foreach ($tree as $term) { // Update the changed term with the new parent value before comparison. - if ($term->id() == $changed_term['tid']) { + if ($term->tid == $changed_term['tid']) { $term = (object) $changed_term; $term->parents = $term->parent; }