diff --git a/change_log.txt b/change_log.txt index e5a31f96..e663dea3 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,7 +1,10 @@  ===== 3.1.25-dev===== (xx.xx.2015) + 13.06.2015 + - bugfix a custom cache resource using smarty_cachereource_keyvaluestore.php did fail if php.ini mbstring.func_overload = 2 (forum topic 25568) + 11.06.2015 - bugfix the lexer could hang on very large quoted strings (forum topic 25570) - + 08.06.2015 - bugfix using {$foo} as array index like $bar.{$foo} or in double quoted string like "some {$foo} thing" failed https://github.com/smarty-php/smarty/issues/49 diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 57410a69..11ebe460 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -111,7 +111,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * smarty version */ - const SMARTY_VERSION = '3.1.25-dev/5'; + const SMARTY_VERSION = '3.1.25-dev/6'; /** * define variable scopes diff --git a/libs/sysplugins/smarty_cacheresource_keyvaluestore.php b/libs/sysplugins/smarty_cacheresource_keyvaluestore.php index c1c0f3fe..507608e4 100644 --- a/libs/sysplugins/smarty_cacheresource_keyvaluestore.php +++ b/libs/sysplugins/smarty_cacheresource_keyvaluestore.php @@ -298,8 +298,8 @@ abstract class Smarty_CacheResource_KeyValueStore extends Smarty_CacheResource */ protected function getMetaTimestamp(&$content) { - $s = unpack("N", substr($content, 0, 4)); - $m = unpack("N", substr($content, 4, 4)); + $s = unpack("N", $content[0] . $content[1] . $content[2] . $content[3]); + $m = unpack("N", $content[4] . $content[5] . $content[6] . $content[7]); $content = substr($content, 8); return $s[1] + ($m[1] / 100000000);