mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
- bugfix function plugins called with assign attribute like {foo assign='bar'} did not output returned content because
because assumption was made that it was assigned to a variable https://github.com/smarty-php/smarty/issues/292
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
===== 3.1.31-dev ===== (xx.xx.xx)
|
||||
15.09.2016
|
||||
- bugfix assigning a variable in if condition by function like {if $value = array_shift($array)} the function got called twice https://github.com/smarty-php/smarty/issues/291
|
||||
- bugfix function plugins called with assign attribute like {foo assign='bar'} did not output returned content because
|
||||
because assumption was made that it was assigned to a variable https://github.com/smarty-php/smarty/issues/292
|
||||
|
||||
11.09.2016
|
||||
- improvement {math} misleading E_USER_WARNING messages when parameter value = null https://github.com/smarty-php/smarty/issues/288
|
||||
|
@@ -114,7 +114,7 @@ class Smarty extends Smarty_Internal_TemplateBase
|
||||
/**
|
||||
* smarty version
|
||||
*/
|
||||
const SMARTY_VERSION = '3.1.31-dev/19';
|
||||
const SMARTY_VERSION = '3.1.31-dev/20';
|
||||
|
||||
/**
|
||||
* define variable scopes
|
||||
|
@@ -67,8 +67,8 @@ class Smarty_Internal_Compile_Private_Function_Plugin extends Smarty_Internal_Co
|
||||
'value' => $output));
|
||||
}
|
||||
//Does tag create output
|
||||
$compiler->has_output = isset($_attr[ 'assign' ]) ? false : true;
|
||||
$output = "<?php " . ($compiler->has_output ? "echo " : '') . "{$output};?>\n";
|
||||
$compiler->has_output = true;
|
||||
$output = "<?php echo {$output};?>\n";
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
@@ -75,8 +75,8 @@ class Smarty_Internal_Compile_Private_Registered_Function extends Smarty_Interna
|
||||
'value' => $output));
|
||||
}
|
||||
//Does tag create output
|
||||
$compiler->has_output = isset($_attr[ 'assign' ]) ? false : true;
|
||||
$output = "<?php " . ($compiler->has_output ? "echo " : '') . "{$output};?>\n";
|
||||
$compiler->has_output = true;
|
||||
$output = "<?php echo {$output};?>\n";
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user