Skip to content

Commit

Permalink
Fixed running of output filters.
Browse files Browse the repository at this point in the history
Fixes #899
  • Loading branch information
wisskid committed Sep 11, 2023
1 parent 052fee3 commit 9b96608
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/Debug.php
Expand Up @@ -210,7 +210,6 @@ public function display_debug($obj, $full = false)
$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
Expand Down
7 changes: 0 additions & 7 deletions src/Smarty.php
Expand Up @@ -384,13 +384,6 @@ class Smarty extends \Smarty\TemplateBase {
*/
public $registered_classes = [];

/**
* registered filters
*
* @var array
*/
public $registered_filters = [];

/**
* registered resources
*
Expand Down
2 changes: 1 addition & 1 deletion src/Template.php
Expand Up @@ -196,7 +196,7 @@ private function render($no_output_filter = true, $display = null) {
);
} 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 {
Expand Down

0 comments on commit 9b96608

Please sign in to comment.