Index: trunk/extensions/UsabilityInitiative/PrefSwitch/SpecialPrefSwitch.php |
— | — | @@ -142,9 +142,11 @@ |
143 | 143 | $this->render( 'main' ); |
144 | 144 | } |
145 | 145 | // Always show a way back |
146 | | - $wgOut->addWikiMsgArray( |
147 | | - 'prefswitch-return', array( $this->originFullUrl, $this->originTitle ), array( 'parse' ) |
148 | | - ); |
| 146 | + if ( $this->originTitle && $this->originFullUrl ) { |
| 147 | + $wgOut->addWikiMsgArray( |
| 148 | + 'prefswitch-return', array( $this->originFullUrl, $this->originTitle ), array( 'parse' ) |
| 149 | + ); |
| 150 | + } |
149 | 151 | // Set page title |
150 | 152 | if ( self::isSwitchedOn( $wgUser ) ) { |
151 | 153 | switch ( $wgRequest->getVal( 'mode' ) ) { |