Merge "HTMLForm: Remove deprecated unused getErrors() method"
[lhc/web/wiklou.git] / includes / TemplateParser.php
index 75494b1..4e60926 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+
 use MediaWiki\MediaWikiServices;
 
 /**
@@ -62,9 +63,9 @@ class TemplateParser {
         */
        public function enableRecursivePartials( $enable ) {
                if ( $enable ) {
-                       $this->compileFlags = $this->compileFlags | LightnCandy::FLAG_RUNTIMEPARTIAL;
+                       $this->compileFlags |= LightnCandy::FLAG_RUNTIMEPARTIAL;
                } else {
-                       $this->compileFlags = $this->compileFlags & ~LightnCandy::FLAG_RUNTIMEPARTIAL;
+                       $this->compileFlags &= ~LightnCandy::FLAG_RUNTIMEPARTIAL;
                }
        }
 
@@ -220,6 +221,6 @@ class TemplateParser {
         */
        public function processTemplate( $templateName, $args, array $scopes = [] ) {
                $template = $this->getTemplate( $templateName );
-               return call_user_func( $template, $args, $scopes );
+               return $template( $args, $scopes );
        }
 }