TextContent::preSaveTransform should return an object of the same class
as $this, not a WikitextContent.
Apparently this was never noticed because most code paths rtrim the
input and TextContent::preSaveTransform returns $this if the rtrim is a
no-op on the input.
Bug: 58451
Change-Id: I9f8f78d52448d1ba055a654a12ff4fad86756110
$text = $this->getNativeData();
$pst = rtrim( $text );
- return ( $text === $pst ) ? $this : new WikitextContent( $pst );
+ return ( $text === $pst ) ? $this : new static( $pst );
}
/**