Fixed running of output filters.

Fixes #899
This commit is contained in:
Simon Wisselink
2023-09-11 11:44:54 +02:00
parent 052fee3a30
commit 9b9660881d
4 changed files with 7 additions and 9 deletions

View File

@ -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

View File

@ -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

View File

@ -384,13 +384,6 @@ class Smarty extends \Smarty\TemplateBase {
*/
public $registered_classes = [];
/**
* registered filters
*
* @var array
*/
public $registered_filters = [];
/**
* registered resources
*

View File

@ -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 {