}
/**
- * @param string|number $sectionId
+ * @param string|int $sectionId
*
* @return Content|bool|null
*
}
/**
- * @param string|number|null|bool $sectionId
+ * @param string|int|null|bool $sectionId
* @param Content $with
* @param string $sectionTitle
*
* @see Content::replaceSection()
*/
public function replaceSection( $sectionId, Content $with, $sectionTitle = '' ) {
-
$myModelId = $this->getModel();
$sectionModelId = $with->getModel();
if ( $sectionId === 'new' ) {
# Inserting a new section
$subject = $sectionTitle ? wfMessage( 'newsectionheaderdefaultlevel' )
- ->rawParams( $sectionTitle )->inContentLanguage()->text() . "\n\n" : '';
+ ->plaintextParams( $sectionTitle )->inContentLanguage()->text() . "\n\n" : '';
if ( Hooks::run( 'PlaceNewSection', [ $this, $oldtext, $subject, &$text ] ) ) {
$text = strlen( trim( $oldtext ) ) > 0
? "{$oldtext}\n\n{$subject}{$text}"