X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fcontent%2FTextContent.php;h=baea812576d23ed3155071215037507fcdf63e76;hb=956ff6609c45e6a4e0787844fda5cf86c4d5b996;hp=d292880ba49dd3b1b81e36fa89b1615c5a6c3e7a;hpb=b74456fca841445a1c9f356fc8e53551eea14dd4;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/content/TextContent.php b/includes/content/TextContent.php index d292880ba4..baea812576 100644 --- a/includes/content/TextContent.php +++ b/includes/content/TextContent.php @@ -37,6 +37,7 @@ class TextContent extends AbstractContent { /** * @param string $text * @param string $model_id + * @throws MWException */ public function __construct( $text, $model_id = CONTENT_MODEL_TEXT ) { parent::__construct( $model_id ); @@ -160,7 +161,7 @@ class TextContent extends AbstractContent { $text = $this->getNativeData(); $pst = rtrim( $text ); - return ( $text === $pst ) ? $this : new static( $pst ); + return ( $text === $pst ) ? $this : new static( $pst, $this->getModel() ); } /**