mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-03 09:54:27 +02:00
Fixed render crash when using inline include with a string template. Fixed #639
This commit is contained in:
@@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
### Changed
|
### Changed
|
||||||
- modifier escape now triggers a E_USER_NOTICE when an unsupported escape type is used https://github.com/smarty-php/smarty/pull/649
|
- modifier escape now triggers a E_USER_NOTICE when an unsupported escape type is used https://github.com/smarty-php/smarty/pull/649
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Fixed render crash when using inline include with a string template https://github.com/smarty-php/smarty/issues/639
|
||||||
|
|
||||||
## [3.1.39] - 2021-02-17
|
## [3.1.39] - 2021-02-17
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
@@ -317,7 +317,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase
|
|||||||
$tpl->template_resource = $template;
|
$tpl->template_resource = $template;
|
||||||
$tpl->cache_id = $cache_id;
|
$tpl->cache_id = $cache_id;
|
||||||
$tpl->compile_id = $compile_id;
|
$tpl->compile_id = $compile_id;
|
||||||
if (isset($uid)) {
|
if (isset($uid) && isset($tpl->compiled->file_dependency[ $uid ])) {
|
||||||
// for inline templates we can get all resource information from file dependency
|
// for inline templates we can get all resource information from file dependency
|
||||||
list($filepath, $timestamp, $type) = $tpl->compiled->file_dependency[ $uid ];
|
list($filepath, $timestamp, $type) = $tpl->compiled->file_dependency[ $uid ];
|
||||||
$tpl->source = new Smarty_Template_Source($smarty, $filepath, $type, $filepath);
|
$tpl->source = new Smarty_Template_Source($smarty, $filepath, $type, $filepath);
|
||||||
|
Reference in New Issue
Block a user