Merge "Revert "Follow-up ee320648fd1: output mw-content-{ltr,rtl} unconditionally""
[lhc/web/wiklou.git] / includes / parser / StripState.php
index 51ae42d..7e38acc 100644 (file)
@@ -144,7 +144,11 @@ class StripState {
                        }
                        $this->circularRefGuard[$marker] = true;
                        $this->recursionLevel++;
-                       $ret = $this->unstripType( $this->tempType, $this->data[$this->tempType][$marker] );
+                       $value = $this->data[$this->tempType][$marker];
+                       if ( $value instanceof Closure ) {
+                               $value = $value();
+                       }
+                       $ret = $this->unstripType( $this->tempType, $value );
                        $this->recursionLevel--;
                        unset( $this->circularRefGuard[$marker] );
                        return $ret;