mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-07 03:44:26 +02:00
- work around of a substr_compare bug in older PHP5 versions
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
30/04/2010
|
30/04/2010
|
||||||
- bugfix when comparing timestamps in sysplugins/smarty_internal_config.php
|
- bugfix when comparing timestamps in sysplugins/smarty_internal_config.php
|
||||||
|
- work around of a substr_compare bug in older PHP5 versions
|
||||||
|
|
||||||
===== RC1 =====
|
===== RC1 =====
|
||||||
|
|
||||||
|
@@ -23,7 +23,7 @@ class Smarty_Internal_Compile_Private_Block_Plugin extends Smarty_Internal_Compi
|
|||||||
public function compile($args, $compiler, $tag, $function)
|
public function compile($args, $compiler, $tag, $function)
|
||||||
{
|
{
|
||||||
$this->compiler = $compiler;
|
$this->compiler = $compiler;
|
||||||
if (strlen($tag) < 6 || substr_compare($tag, 'close', -5, 5) != 0) {
|
if (strlen($tag) < 6 || substr($tag, -5) != 'close') {
|
||||||
// opening tag of block plugin
|
// opening tag of block plugin
|
||||||
$this->required_attributes = array();
|
$this->required_attributes = array();
|
||||||
$this->optional_attributes = array('_any');
|
$this->optional_attributes = array('_any');
|
||||||
@@ -69,4 +69,4 @@ class Smarty_Internal_Compile_Private_Block_Plugin extends Smarty_Internal_Compi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
@@ -23,7 +23,7 @@ class Smarty_Internal_Compile_Private_Registered_Block extends Smarty_Internal_C
|
|||||||
public function compile($args, $compiler, $tag)
|
public function compile($args, $compiler, $tag)
|
||||||
{
|
{
|
||||||
$this->compiler = $compiler;
|
$this->compiler = $compiler;
|
||||||
if (strlen($tag) < 6 || substr_compare($tag, 'close', -5, 5) != 0) {
|
if (strlen($tag) < 6 || substr($tag,-5) != 'close') {
|
||||||
// opening tag of block plugin
|
// opening tag of block plugin
|
||||||
$this->required_attributes = array();
|
$this->required_attributes = array();
|
||||||
$this->optional_attributes = array('_any');
|
$this->optional_attributes = array('_any');
|
||||||
|
@@ -133,7 +133,7 @@ class Smarty_Internal_TemplateCompilerBase {
|
|||||||
return '';
|
return '';
|
||||||
} else {
|
} else {
|
||||||
// not an internal compiler tag
|
// not an internal compiler tag
|
||||||
if (strlen($tag) < 6 || substr_compare($tag, 'close', -5, 5) != 0) {
|
if (strlen($tag) < 6 || substr($tag, -5) != 'close') {
|
||||||
// check if tag is a registered object
|
// check if tag is a registered object
|
||||||
if (isset($this->smarty->registered_objects[$tag]) && isset($args['object_methode'])) {
|
if (isset($this->smarty->registered_objects[$tag]) && isset($args['object_methode'])) {
|
||||||
$methode = $args['object_methode'];
|
$methode = $args['object_methode'];
|
||||||
|
Reference in New Issue
Block a user