diff options
Diffstat (limited to 'modules/taxonomy')
-rw-r--r-- | modules/taxonomy/taxonomy.module | 3 | ||||
-rw-r--r-- | modules/taxonomy/taxonomy.test | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 4cc5de737..290162e26 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -903,7 +903,8 @@ function taxonomy_vocabulary_load_multiple($vids = array(), $conditions = array( * Results are statically cached. */ function taxonomy_vocabulary_load($vid) { - return reset(taxonomy_vocabulary_load_multiple(array($vid))); + $vocabularies = taxonomy_vocabulary_load_multiple(array($vid)); + return reset($vocabularies); } /** diff --git a/modules/taxonomy/taxonomy.test b/modules/taxonomy/taxonomy.test index 726f29f15..025e902f3 100644 --- a/modules/taxonomy/taxonomy.test +++ b/modules/taxonomy/taxonomy.test @@ -441,7 +441,8 @@ class TaxonomyTermTestCase extends TaxonomyWebTestCase { // Create the term to edit. $this->drupalPost('admin/structure/taxonomy/' . $this->vocabulary->vid . '/add', $edit, t('Save')); - $term = reset(taxonomy_get_term_by_name($edit['name'])); + $terms = taxonomy_get_term_by_name($edit['name']); + $term = reset($terms); $this->assertNotNull($term, t('Term found in database')); // Submitting a term takes us to the add page; we need the List page. @@ -672,7 +673,8 @@ class TaxonomyHooksTestCase extends TaxonomyWebTestCase { 'antonym' => 'Long', ); $this->drupalPost('admin/structure/taxonomy/' . $vocabulary->vid . '/add', $edit, t('Save')); - $term = reset(taxonomy_get_term_by_name($edit['name'])); + $terms = taxonomy_get_term_by_name($edit['name']); + $term = reset($terms); $this->assertEqual($term->antonym, $edit['antonym'], t('Antonym was loaded into the term object')); // Update the term with a different antonym. |