mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
fix assign function problem with empty value passed
This commit is contained in:
@@ -186,14 +186,14 @@ function smarty_mod_default($string, $default="")
|
|||||||
\*======================================================================*/
|
\*======================================================================*/
|
||||||
function smarty_func_assign($args, &$smarty_obj)
|
function smarty_func_assign($args, &$smarty_obj)
|
||||||
{
|
{
|
||||||
extract($args);
|
extract($args);
|
||||||
|
|
||||||
if (empty($var)) {
|
if (empty($var)) {
|
||||||
$smarty_obj->_trigger_error_msg("assign: missing 'var' parameter");
|
$smarty_obj->_trigger_error_msg("assign: missing 'var' parameter");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($value)) {
|
if (!in_array('value', array_keys($args))) {
|
||||||
$smarty_obj->_trigger_error_msg("assign: missing 'value' parameter");
|
$smarty_obj->_trigger_error_msg("assign: missing 'value' parameter");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user