Skip to content

Commit

Permalink
[#10211] Fix parser state bug triggered by media sources
Browse files Browse the repository at this point in the history
Fix state issue with modParser::$_removingUnprocessed and modParser::$_processingUncacheable being triggered by processing of media source properties. May have other triggers as well.
  • Loading branch information
opengeek committed Oct 1, 2013
1 parent 1cb39c8 commit 5cd13cb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions core/docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
This file shows the changes in recent releases of MODX. The most current release is usually the
development release, and is only shown to give an idea of what's currently in the pipeline.

- [#10211] Fix parser state bug triggered by media sources
- Fix loading modResource derivatives in class_key dropdown
- [#9973] Prevent extended user classes being set to modUser
- Upgrade xPDO to 2.2.9-pl
Expand Down
8 changes: 7 additions & 1 deletion core/model/modx/modparser.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ public function collectElementTags($origContent, array &$matches, $prefix= '[[',
* @return int The number of processed tags
*/
public function processElementTags($parentTag, & $content, $processUncacheable= false, $removeUnprocessed= false, $prefix= "[[", $suffix= "]]", $tokens= array (), $depth= 0) {
$_processingTag = $this->_processingTag;
$_processingUncacheable = $this->_processingUncacheable;
$_removingUnprocessed = $this->_removingUnprocessed;
$this->_processingTag = true;
$this->_processingUncacheable = (boolean) $processUncacheable;
$this->_removingUnprocessed = (boolean) $removeUnprocessed;
Expand Down Expand Up @@ -256,7 +259,10 @@ public function processElementTags($parentTag, & $content, $processUncacheable=
$processed+= $this->processElementTags($parentTag, $content, $processUncacheable, $removeUnprocessed, $prefix, $suffix, $tokens, $depth);
}
}
$this->_processingTag = false;

$this->_removingUnprocessed = $_removingUnprocessed;
$this->_processingUncacheable = $_processingUncacheable;
$this->_processingTag = $_processingTag;
return $processed;
}

Expand Down

0 comments on commit 5cd13cb

Please sign in to comment.