Commit 6630a4eb authored by catch's avatar catch
Browse files

Issue #1359710 by pwolanin, xjm: Fixed taxonomy_menu() passes invalid...

Issue #1359710 by pwolanin, xjm: Fixed taxonomy_menu() passes invalid arguments into taxonomy_form_term().
parent 06373cfb
......@@ -310,7 +310,9 @@ function taxonomy_menu() {
$items['taxonomy/term/%taxonomy_term/edit'] = array(
'title' => 'Edit',
'page callback' => 'drupal_get_form',
'page arguments' => array('taxonomy_form_term', 2),
// Pass a NULL argument to ensure that additional path components are not
// passed to taxonomy_form_term() as the vocabulary machine name argument.
'page arguments' => array('taxonomy_form_term', 2, NULL),
'access callback' => 'taxonomy_term_edit_access',
'access arguments' => array(2),
'type' => MENU_LOCAL_TASK,
......
......@@ -703,6 +703,10 @@ class TaxonomyTermTestCase extends TaxonomyWebTestCase {
// Check that the term feed page is working.
$this->drupalGet('taxonomy/term/' . $term->tid . '/feed');
// Check that the term edit page does not try to interpret additional path
// components as arguments for taxonomy_form_term().
$this->drupalGet('taxonomy/term/' . $term->tid . '/edit/' . $this->randomName());
// Delete the term.
$this->drupalPost('taxonomy/term/' . $term->tid . '/edit', array(), t('Delete'));
$this->drupalPost(NULL, NULL, t('Delete'));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment