r86269 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86268‎ | r86269 | r86270 >
Date:18:49, 17 April 2011
Author:mkroetzsch
Status:deferred
Tags:
Comment:
ensure that namespace is really int, not double (strangely, this sometimes occurs, leading to issues when using ===)
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/dataitems/SMW_DI_WikiPage.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/dataitems/SMW_DI_WikiPage.php
@@ -39,10 +39,10 @@
4040 public function __construct( $dbkey, $namespace, $interwiki, $typeid = '_wpg' ) {
4141 parent::__construct( $typeid );
4242 if ( !is_numeric( $namespace ) ) {
43 - throw new SMWDataItemException( "Given namespace '$namespace' is not a number." );
 43+ throw new SMWDataItemException( "Given namespace '$namespace' is not an integer." );
4444 }
4545 $this->m_dbkey = $dbkey;
46 - $this->m_namespace = $namespace;
 46+ $this->m_namespace = (int)$namespace; // really make this an integer
4747 $this->m_interwiki = $interwiki;
4848 }
4949

Status & tagging log