wfRunHooks() return value no longer implies whether variable value was found
authorvishnu <mails2vichu@gmail.com>
Sat, 28 Dec 2013 14:14:50 +0000 (19:44 +0530)
committerSiebrand <siebrand@wikimedia.org>
Tue, 31 Dec 2013 09:10:52 +0000 (09:10 +0000)
Bug: 12837
Change-Id: I459923deee4fa294f78f277620f229fc2a84d266

includes/parser/Parser.php

index 9be75ae..31638ce 100644 (file)
@@ -3034,11 +3034,8 @@ class Parser {
                                return $wgLanguageCode;
                        default:
                                $ret = null;
-                               if ( wfRunHooks( 'ParserGetVariableValueSwitch', array( &$this, &$this->mVarCache, &$index, &$ret, &$frame ) ) ) {
-                                       return $ret;
-                               } else {
-                                       return null;
-                               }
+                               wfRunHooks( 'ParserGetVariableValueSwitch', array( &$this, &$this->mVarCache, &$index, &$ret, &$frame ) );
+                               return $ret;
                }
 
                if ( $index ) {