dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix creation of pages in the MediaWiki namespace.
[lhc/web/wiklou.git]
/
includes
/
content
/
TextContent.php
diff --git
a/includes/content/TextContent.php
b/includes/content/TextContent.php
index
68e6c39
..
e98584f
100644
(file)
--- a/
includes/content/TextContent.php
+++ b/
includes/content/TextContent.php
@@
-12,6
+12,10
@@
abstract class TextContent extends AbstractContent {
public function __construct( $text, $model_id = null ) {
parent::__construct( $model_id );
+ if ( !is_string( $text ) ) {
+ throw new MWException( "TextContent expects a string in the constructor." );
+ }
+
$this->mText = $text;
}