From 1024fb7e69389f22085db4b15b7c1a91d093b65e Mon Sep 17 00:00:00 2001 From: aude Date: Wed, 24 Oct 2012 15:35:02 +0000 Subject: [PATCH] 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 --- includes/content/TextContent.php | 4 ---- 1 file changed, 4 deletions(-) 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." ); } -- 2.20.1