Merge "Do not use OutputPage to output exceptions in Installer"
[lhc/web/wiklou.git] / includes / Article.php
index e0396a1..a5d4d5b 100644 (file)
@@ -972,7 +972,7 @@ class Article implements Page {
                                $outputPage->addSubtitle( wfMessage( 'redirectedfrom' )->rawParams( $redir ) );
 
                                // Set the fragment if one was specified in the redirect
-                               if ( strval( $this->getTitle()->getFragment() ) != '' ) {
+                               if ( $this->getTitle()->hasFragment() ) {
                                        $outputPage->addJsConfigVars( 'wgRedirectToFragment', $this->getTitle()->getFragmentForURL() );
                                        $outputPage->addModules( 'mediawiki.action.view.redirectToFragment' );
                                }