Index: branches/5.3.x/core/kernel/nparser/nparser.php =================================================================== diff -u -N -r16111 -r16395 --- branches/5.3.x/core/kernel/nparser/nparser.php (.../nparser.php) (revision 16111) +++ branches/5.3.x/core/kernel/nparser/nparser.php (.../nparser.php) (revision 16395) @@ -1,6 +1,6 @@ CachingEnabled = !$this->Application->isAdmin && $this->Application->ConfigValue('SystemTagCache') && $this->Application->isCachingType(CACHING_TYPE_MEMORY); } + function Clear() + { + // Discard any half-parsed content (e.g. from nested RenderElements). + $keep_buffering_levels = kUtil::constOn('SKIP_OUT_COMPRESSION') ? 1 : 2; + + while ( ob_get_level() > $keep_buffering_levels ) { + ob_end_clean(); + } + + $this->Stack = array(); + $this->Level = 0; + + $this->Buffers = array(); + $this->InsideComment = false; + + $this->SkipComments = true; + + $this->Params = array(); + $this->ParamsStack = array(); + $this->ParamsLevel = 0; + + $this->Definitions = ''; + + $this->Elements = array(); + + $this->ElementLocations = array(); + + $this->DataExists = false; + + $this->TemplateName = null; + $this->TempalteFullPath = null; + + $this->CachePointers = array(); + $this->Cachable = array(); + + $this->CacheLevel = 0; + + $this->FullCachePage = false; + + $this->PrefixesInUse = array(); + + $this->Captures = array(); + } + function Compile($pre_parsed, $template_name = 'unknown') { $data = file_get_contents($pre_parsed['tname']);