mirror of
https://github.com/smarty-php/smarty.git
synced 2026-05-04 19:54:14 +02:00
- bugfix Smarty failed when executing PHP on HHVM (Hip Hop 2.4) because uniqid('',true) does return string with ',' (forum topic 20343)
This commit is contained in:
@@ -217,7 +217,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase
|
||||
return false;
|
||||
}
|
||||
$this->properties['cache_lifetime'] = $this->cache_lifetime;
|
||||
$this->properties['unifunc'] = 'content_' . str_replace('.', '_', uniqid('', true));
|
||||
$this->properties['unifunc'] = 'content_' . str_replace(array('.',','), '_', uniqid('', true));
|
||||
$content = $this->createTemplateCodeFrame($content, true);
|
||||
$_smarty_tpl = $this;
|
||||
eval("?>" . $content);
|
||||
@@ -399,7 +399,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase
|
||||
}
|
||||
$this->properties['version'] = Smarty::SMARTY_VERSION;
|
||||
if (!isset($this->properties['unifunc'])) {
|
||||
$this->properties['unifunc'] = 'content_' . str_replace('.', '_', uniqid('', true));
|
||||
$this->properties['unifunc'] = 'content_' . str_replace(array('.',','), '_', uniqid('', true));
|
||||
}
|
||||
if (!$this->source->recompiled) {
|
||||
$output .= "\$_valid = \$_smarty_tpl->decodeProperties(" . var_export($this->properties, true) . ',' . ($cache ? 'true' : 'false') . "); /*/%%SmartyHeaderCode%%*/?>\n";
|
||||
|
||||
Reference in New Issue
Block a user