- bugfix a custom cache resource using smarty_cachereource_keyvaluestore.php did fail if php.ini mbstring.func_overload = 2 (forum topic 25568)

This commit is contained in:
Uwe Tews
2015-06-13 19:39:02 +02:00
parent 768b7d1ec5
commit e96ee1b5d6
3 changed files with 7 additions and 4 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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);