- work around of a substr_compare bug in older PHP5 versions

This commit is contained in:
Uwe.Tews
2010-04-30 14:04:03 +00:00
parent ea84147f45
commit ace9d4fe5e

View File

@@ -24,7 +24,7 @@ class Smarty_Internal_Compile_Private_Object_Block_Function extends Smarty_Inter
public function compile($args, $compiler, $tag, $methode)
{
$this->compiler = $compiler;
if (strlen($tag) < 5 || substr_compare($tag, 'close', -5, 5) != 0) {
if (strlen($tag) < 5 || substr($tag, -5) != 'close') {
// opening tag of block plugin
$this->required_attributes = array();
$this->optional_attributes = array('_any');
@@ -57,4 +57,4 @@ class Smarty_Internal_Compile_Private_Object_Block_Function extends Smarty_Inter
}
}
?>
?>