mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 10:54:27 +02:00
fixed handling of multiple identical calls to {insert}.
the function was called multiple times, but all inserts where replaced by the results of the first call to the insert function.
This commit is contained in:
1
NEWS
1
NEWS
@@ -1,3 +1,4 @@
|
||||
- fix handling of multiple identical inserts in one display()-call (messju)
|
||||
- replace {} string access with equivalent substr() to avoid E_STRICT
|
||||
warnings in PHP 5.1 (boots)
|
||||
- return valid reference in get_config_vars() when given var is
|
||||
|
@@ -52,7 +52,7 @@ function smarty_core_process_cached_inserts($params, &$smarty)
|
||||
$replace = '';
|
||||
}
|
||||
|
||||
$params['results'] = str_replace($cached_inserts[$i], $replace, $params['results']);
|
||||
$params['results'] = substr_replace($params['results'], $replace, strpos($params['results'], $cached_inserts[$i]), strlen($cached_inserts[$i]));
|
||||
if ($smarty->debugging) {
|
||||
$_params = array();
|
||||
require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
|
||||
|
Reference in New Issue
Block a user