From fd8e7ce3a6b421fc95c6e3d94720bd8501f85fc5 Mon Sep 17 00:00:00 2001 From: Anton Andersen Date: Mon, 27 May 2013 17:45:54 +0400 Subject: [PATCH] [#9859] Fix a near infinite recursion loop on TV ouptut filtering Make modOutputFilter->filter() convert $ouptut into a string if there were any processing. Signed-off-by: Anton Andersen --- core/model/modx/filters/modoutputfilter.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/model/modx/filters/modoutputfilter.class.php b/core/model/modx/filters/modoutputfilter.class.php index deaa6299f89..17e39a45e93 100644 --- a/core/model/modx/filters/modoutputfilter.class.php +++ b/core/model/modx/filters/modoutputfilter.class.php @@ -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); @@ -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; } }