Fix use of $depth property; was spewing notices, using local var by accident (?)
authorBrion Vibber <brion@users.mediawiki.org>
Fri, 28 Mar 2008 18:36:57 +0000 (18:36 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Fri, 28 Mar 2008 18:36:57 +0000 (18:36 +0000)
includes/Preprocessor_Hash.php

index 8579098..ee3539a 100644 (file)
@@ -804,10 +804,10 @@ class PPFrame_Hash implements PPFrame {
                {
                        return '<span class="error">Node-count limit exceeded</span>';
                }
-               if ( $depth > $this->parser->mOptions->mMaxPPExpandDepth ) {
+               if ( $this->depth > $this->parser->mOptions->mMaxPPExpandDepth ) {
                        return '<span class="error">Expansion depth limit exceeded</span>';
                }
-               ++$depth;
+               ++$this->depth;
 
                $outStack = array( '', '' );
                $iteratorStack = array( false, $root );
@@ -960,7 +960,7 @@ class PPFrame_Hash implements PPFrame {
                                }
                        }
                }
-               --$depth;
+               --$this->depth;
                return $outStack[0];
        }