Commit fae3c986 authored by catch's avatar catch

Issue #1410260 by swentel, mojzis, droplet, pingers: Fixed rss.xml/whatever triggers PHP error.

parent 3c0da100
......@@ -74,5 +74,9 @@ function testNodeRSSContent() {
$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.'));
}
}
......@@ -1901,6 +1901,9 @@ function node_menu() {
$items['rss.xml'] = array(
'title' => 'RSS feed',
'page callback' => 'node_feed',
// Pass a FALSE and array argument to ensure that additional path components
// are not passed to node_feed().
'page arguments' => array(FALSE, array()),
'access arguments' => array('access content'),
'type' => MENU_CALLBACK,
);
......
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