diff --git a/CHANGELOG.md b/CHANGELOG.md index 73d06406..d931babe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed +- Registered output filters wouldn't run [#899](https://github.com/smarty-php/smarty/issues/899) + +### Removed +- Removed `$smarty->registered_filters` array + ## [5.0.0-rc1] - 2023-08-08 ### Added diff --git a/src/Debug.php b/src/Debug.php index d313a7a5..9d2bf9b1 100644 --- a/src/Debug.php +++ b/src/Debug.php @@ -210,7 +210,6 @@ class Debug extends Data $debObj->error_reporting = E_ALL & ~E_NOTICE; $debObj->debug_tpl = $smarty->debug_tpl ?? 'file:' . __DIR__ . '/../debug.tpl'; $debObj->registered_resources = array(); - $debObj->registered_filters = array(); $debObj->escape_html = true; $debObj->caching = \Smarty::CACHING_OFF; // prepare information of assigned variables diff --git a/src/Smarty.php b/src/Smarty.php index bb27ff9d..98a40e90 100644 --- a/src/Smarty.php +++ b/src/Smarty.php @@ -384,13 +384,6 @@ class Smarty extends \Smarty\TemplateBase { */ public $registered_classes = []; - /** - * registered filters - * - * @var array - */ - public $registered_filters = []; - /** * registered resources * diff --git a/src/Template.php b/src/Template.php index 1c7fdf9b..8c81832d 100644 --- a/src/Template.php +++ b/src/Template.php @@ -196,7 +196,7 @@ class Template extends TemplateBase { ); } else { if ((!$this->caching || $this->getCached()->getNocacheCode() || $this->getSource()->handler->recompiled) - && !$no_output_filter && isset($this->smarty->registered_filters['output']) + && !$no_output_filter ) { echo $this->smarty->runOutputFilters(ob_get_clean(), $this); } else {