diff options
author | webchick <webchick@24967.no-reply.drupal.org> | 2012-09-19 23:33:35 -0700 |
---|---|---|
committer | webchick <webchick@24967.no-reply.drupal.org> | 2012-09-19 23:33:35 -0700 |
commit | f28f4d086ff022159d193f81bee1bcdf077e3c84 (patch) | |
tree | 6ff3b7d6195720aeafe682721149dc64c0ca6a1c /modules/node | |
parent | 4603bcfa97b06a2b171051032fa8211d7cbed662 (diff) | |
download | brdo-f28f4d086ff022159d193f81bee1bcdf077e3c84.tar.gz brdo-f28f4d086ff022159d193f81bee1bcdf077e3c84.tar.bz2 |
Issue #1410260 by swentel, mojzis, droplet, pingers, drupdan3: Fixed rss.xml/whatever triggers PHP error.
Diffstat (limited to 'modules/node')
-rw-r--r-- | modules/node/node.module | 3 | ||||
-rw-r--r-- | modules/node/node.test | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/modules/node/node.module b/modules/node/node.module index 65a4224cf..d3d1c85b1 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -1984,6 +1984,9 @@ function node_menu() { 'page callback' => 'node_feed', 'access arguments' => array('access content'), 'type' => MENU_CALLBACK, + // Pass a FALSE and array argument to ensure that additional path components + // are not passed to node_feed(). + 'page arguments' => array(FALSE, array()), ); // @todo Remove this loop when we have a 'description callback' property. // Reset internal static cache of _node_types_build(), forces to rebuild the diff --git a/modules/node/node.test b/modules/node/node.test index 7080ce7ab..dc21daf6b 100644 --- a/modules/node/node.test +++ b/modules/node/node.test @@ -832,7 +832,11 @@ class NodeRSSContentTestCase extends DrupalWebTestCase { // viewing node. $this->drupalGet("node/$node->nid"); $this->assertNoText($rss_only_content, t('Node content designed for RSS doesn\'t appear when viewing node.')); - + + // Check that the node feed page does not try to interpret additional path + // components as arguments for node_feed() and returns default content. + $this->drupalGet('rss.xml/' . $this->randomName() . '/' . $this->randomName()); + $this->assertText($rss_only_content, t('Ignore page arguments when delivering rss.xml.')); } } |