$this->mTitle = $title;
$this->mId = $title->getArticleID();
- assert( $this->mId > 0 );
if ( !$this->mId ) {
throw new MWException( "The Title object did not provide an article ID. Perhaps the page doesn't exist?" );
parent::__construct( );
$this->mTitle = $title;
+
+ if ( !$title->getArticleID() ) {
+ throw new MWException( "The Title object did not provide an article ID. Perhaps the page doesn't exist?" );
+ }
}
/**