From: aude Date: Wed, 24 Oct 2012 15:35:02 +0000 (+0000) Subject: revert gerrit change 29597 for TextContent constructor X-Git-Tag: 1.31.0-rc.0~21832^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/journal.php?a=commitdiff_plain;h=1024fb7e69389f22085db4b15b7c1a91d093b65e;p=lhc%2Fweb%2Fwiklou.git revert gerrit change 29597 for TextContent constructor https://gerrit.wikimedia.org/r/#/c/29597/ use cases that pass non-strings to TextContent need to be handled differently and handle the exceptions Change-Id: Id3f88b0fb867fff0d16abcf570178cbbe86e89a1 --- diff --git a/includes/content/TextContent.php b/includes/content/TextContent.php index 048ac396d3..74c5a882cd 100644 --- a/includes/content/TextContent.php +++ b/includes/content/TextContent.php @@ -32,10 +32,6 @@ class TextContent extends AbstractContent { public function __construct( $text, $model_id = CONTENT_MODEL_TEXT ) { parent::__construct( $model_id ); - if ( $text === null || $text === false ) { - $text = ''; - } - if ( !is_string( $text ) ) { throw new MWException( "TextContent expects a string in the constructor." ); }