From 8c6f6dd5e5b6021cd56e5a8f2bd406e0e01bde6a Mon Sep 17 00:00:00 2001 From: Jens Frank Date: Sun, 3 Oct 2004 07:06:18 +0000 Subject: [PATCH] Some paranoia checks --- includes/Title.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/Title.php b/includes/Title.php index 36e34c89eb..f7e7574e43 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -188,7 +188,7 @@ class Title { $t =& new Title(); $t->mInterwiki = ''; $t->mFragment = ''; - $t->mNamespace = $ns; + $t->mNamespace = IntVal( $ns ); $t->mDbkeyform = $title; $t->mArticleID = ( $ns >= 0 ) ? -1 : 0; $t->mUrlform = wfUrlencode( $title ); @@ -478,7 +478,7 @@ class Title { * @param int $n the namespace index, one of the NS_xxxx constants * @access public */ - function setNamespace( $n ) { $this->mNamespace = $n; } + function setNamespace( $n ) { $this->mNamespace = IntVal( $n; ) } /** * Get the interwiki prefix (or null string) * @return string -- 2.20.1