Skip to content

Commit

Permalink
[modxcms#9859] Fix a near infinite recursion loop on TV ouptut filtering
Browse files Browse the repository at this point in the history
Make modOutputFilter->filter() convert $ouptut into a string
if there were any processing.

Signed-off-by: Anton Andersen <[email protected]>
  • Loading branch information
TriAnMan committed May 27, 2013
1 parent 7fd91c4 commit fd8e7ce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/model/modx/filters/modoutputfilter.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function __construct(modX &$modx) {
/**
* Filters the output
*
* @param mixed $element The element to filter
* @param modElement $element The element to filter
*/
public function filter(&$element) {
$usemb = function_exists('mb_strlen') && (boolean)$this->modx->getOption('use_multibyte',null,false);
Expand Down Expand Up @@ -633,6 +633,8 @@ public function filter(&$element) {
$this->modx->log(modX::LOG_LEVEL_ERROR,$e->getMessage());
}
}
// convert $output to string if there were any processing
$output = (string)$output;
}
}

Expand Down

0 comments on commit fd8e7ce

Please sign in to comment.