From: Jens Frank Date: Sun, 3 Oct 2004 07:06:18 +0000 (+0000) Subject: Some paranoia checks X-Git-Tag: 1.5.0alpha1~1673 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=8c6f6dd5e5b6021cd56e5a8f2bd406e0e01bde6a;p=lhc%2Fweb%2Fwiklou.git Some paranoia checks --- 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