summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwebchick2012-09-20 06:33:35 (GMT)
committer webchick2012-09-20 06:33:35 (GMT)
commitf28f4d086ff022159d193f81bee1bcdf077e3c84 (patch)
tree6ff3b7d6195720aeafe682721149dc64c0ca6a1c
parent4603bcfa97b06a2b171051032fa8211d7cbed662 (diff)
Issue #1410260 by swentel, mojzis, droplet, pingers, drupdan3: Fixed rss.xml/whatever triggers PHP error.
-rw-r--r--modules/node/node.module3
-rw-r--r--modules/node/node.test6
2 files changed, 8 insertions, 1 deletions
diff --git a/modules/node/node.module b/modules/node/node.module
index 65a4224..d3d1c85 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 7080ce7..dc21daf 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.'));
}
}