namespace in Special:Watchlist
* (bug 15172) 'Go' button of Special:Recentchanges now on the same line as the
last input element (like Special:Watchlist too)
+* (bug 15351) Fix fatal error for invalid section fragments in autocomments
=== API changes in 1.14 ===
$sectionTitle = clone( $title );
$sectionTitle->mFragment = $section;
}
- $link = $this->link( $sectionTitle,
- wfMsgForContent( 'sectionlink' ), array(), array(),
- 'noclasses' );
+ # FIXME: $sectionTitle should probably always be valid at this
+ # point, but in some scenarios it's not (bug 15351). Is this cor-
+ # rect?
+ if( $title instanceof Title ) {
+ $link = $this->link( $sectionTitle,
+ wfMsgForContent( 'sectionlink' ), array(), array(),
+ 'noclasses' );
+ } else {
+ $link = '';
+ }
}
- $auto = $link . $auto;
+ $auto = "$link$auto";
if( $pre ) {
# written summary $presep autocomment (summary /* section */)
$auto = wfMsgExt( 'autocomment-prefix', array( 'escapenoentities', 'content' ) ) . $auto;