Merge "(bug 47070) check content model namespace on import."
[lhc/web/wiklou.git] / includes / content / TextContent.php
index d03d61e..068b150 100644 (file)
@@ -38,7 +38,7 @@ class TextContent extends AbstractContent {
 
                if ( $text === null || $text === false ) {
                        wfWarn( "TextContent constructed with \$text = " . var_export( $text, true ) . "! "
-                               . "This may indicate an error in the caller's scope." );
+                               . "This may indicate an error in the caller's scope.", 2 );
 
                        $text = '';
                }
@@ -151,7 +151,7 @@ class TextContent extends AbstractContent {
                $text = $this->getNativeData();
                $pst = rtrim( $text );
 
-               return ( $text === $pst ) ? $this : new WikitextContent( $pst );
+               return ( $text === $pst ) ? $this : new static( $pst );
        }
 
        /**