Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -1187,6 +1187,13 @@ |
1188 | 1188 | * @return String: HTML |
1189 | 1189 | */ |
1190 | 1190 | public function parse( $text, $linestart = true, $interface = false, $language = null ) { |
| 1191 | + // Check one for one common cause for parser state resetting |
| 1192 | + $callers = wfGetAllCallers( 10 ); |
| 1193 | + if ( strpos( $callers, 'Parser::extensionSubstitution' ) !== false ) { |
| 1194 | + throw new MWException( "wfMsg* function with parsing cannot be used " . |
| 1195 | + "inside a tag hook. Should use parser->recursiveTagParse() instead" ); |
| 1196 | + } |
| 1197 | + |
1191 | 1198 | global $wgParser; |
1192 | 1199 | |
1193 | 1200 | if( is_null( $this->getTitle() ) ) { |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -68,6 +68,8 @@ |
69 | 69 | * If an edit summary exceeds 250 bytes and is truncated, add an ellipse |
70 | 70 | * (bug 26638) Database error pages display correctly in RTL languages |
71 | 71 | * (bug 26187) Confirmrecreate no longer parses the edit summary |
| 72 | +* (bug 25506) Exception is thrown if OutputPage::parse is called inside a tag hook, |
| 73 | + which would reset parser state |
72 | 74 | |
73 | 75 | === API changes in 1.18 === |
74 | 76 | * (bug 26339) Throw warning when truncating an overlarge API result |