From c81948d60264766585bd21af04fb3a630a7912ce Mon Sep 17 00:00:00 2001 From: Uwe Tews Date: Fri, 23 Mar 2018 19:34:18 +0100 Subject: [PATCH] - bugfix preg_replace could fail on large content resulting in a blank page https://github.com/smarty-php/smarty/issues/417 --- libs/sysplugins/smarty_internal_runtime_updatecache.php | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/sysplugins/smarty_internal_runtime_updatecache.php b/libs/sysplugins/smarty_internal_runtime_updatecache.php index 1fc7bd3e..a3cd21dd 100644 --- a/libs/sysplugins/smarty_internal_runtime_updatecache.php +++ b/libs/sysplugins/smarty_internal_runtime_updatecache.php @@ -72,6 +72,7 @@ class Smarty_Internal_Runtime_UpdateCache $php_pattern = '/(<%|%>|<\?php|<\?|\?>|)/'; $content = ob_get_clean(); $hash_array = $cached->hashes; + $hash_array[$_template->compiled->nocache_hash] = true; $hash_array = array_keys($hash_array); $nocache_hash = '(' . implode('|', $hash_array) . ')'; $_template->cached->has_nocache_code = false;