From 27895ef12a64b790174b89a3037cb967980639e2 Mon Sep 17 00:00:00 2001 From: Steve Sanbeg Date: Thu, 21 Dec 2006 00:07:13 +0000 Subject: [PATCH] save path level before recursing into functions, for better cycle detection --- includes/Parser.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/Parser.php b/includes/Parser.php index 1642105916..545651242e 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -2957,6 +2957,9 @@ class Parser } wfProfileOut( __METHOD__.'-modifiers' ); + //save path level before recursing into functions & templates. + $lastPathLevel = $this->mTemplatePath; + # Parser functions if ( !$found ) { wfProfileIn( __METHOD__ . '-pfunc' ); @@ -3025,7 +3028,6 @@ class Parser } # Load from database - $lastPathLevel = $this->mTemplatePath; if ( !$found ) { wfProfileIn( __METHOD__ . '-loadtpl' ); $ns = NS_TEMPLATE; -- 2.20.1