Index: trunk/phase3/includes/Parser.php |
— | — | @@ -2616,7 +2616,11 @@ |
2617 | 2617 | $lastPathLevel = $this->mTemplatePath; |
2618 | 2618 | if ( !$found ) { |
2619 | 2619 | $ns = NS_TEMPLATE; |
2620 | | - $part1 = $this->maybeDoSubpageLink( $part1, $subpage='' ); |
| 2620 | + # declaring $subpage directly in the function call |
| 2621 | + # does not work correctly with references and breaks |
| 2622 | + # {{/subpage}}-style inclusions |
| 2623 | + $subpage = ''; |
| 2624 | + $part1 = $this->maybeDoSubpageLink( $part1, $subpage ); |
2621 | 2625 | if ($subpage !== '') { |
2622 | 2626 | $ns = $this->mTitle->getNamespace(); |
2623 | 2627 | } |