+ return null; // Bad title
+ }
+
+ // If the page is a redirect, follow the redirect.
+ if ( $title->isRedirect() ) {
+ $content = $this->getContentObj( $title );
+ $title = $content ? $content->getUltimateRedirectTarget() : null;
+ if ( !$title ) {
+ return null; // Dead redirect
+ }