Index: parser/Parser.php =================================================================== --- parser/Parser.php (revision 102411) +++ parser/Parser.php (working copy) @@ -2834,12 +2834,10 @@ global $wgLanguageCode; return $wgLanguageCode; default: - $ret = null; - if ( wfRunHooks( 'ParserGetVariableValueSwitch', array( &$this, &$this->mVarCache, &$index, &$ret, &$frame ) ) ) { - return $ret; - } else { - return null; - } + // allow extensions to register variables: + $ret = null; // null implies no variable found + wfRunHooks( 'ParserGetVariableValueSwitch', array( &$this, &$this->mVarCache, &$index, &$ret, &$frame ) ); + return $ret; } if ( $index ) {