summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--change_log.txt2
-rw-r--r--libs/Smarty.class.php2
-rw-r--r--libs/sysplugins/smarty_internal_compile_private_function_plugin.php4
-rw-r--r--libs/sysplugins/smarty_internal_compile_private_registered_function.php4
4 files changed, 7 insertions, 5 deletions
diff --git a/change_log.txt b/change_log.txt
index c60f1d52..e94baf5c 100644
--- a/change_log.txt
+++ b/change_log.txt
@@ -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
diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php
index 6816b7dc..4b676865 100644
--- a/libs/Smarty.class.php
+++ b/libs/Smarty.class.php
@@ -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
diff --git a/libs/sysplugins/smarty_internal_compile_private_function_plugin.php b/libs/sysplugins/smarty_internal_compile_private_function_plugin.php
index e7934e10..26529bb6 100644
--- a/libs/sysplugins/smarty_internal_compile_private_function_plugin.php
+++ b/libs/sysplugins/smarty_internal_compile_private_function_plugin.php
@@ -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;
}
}
diff --git a/libs/sysplugins/smarty_internal_compile_private_registered_function.php b/libs/sysplugins/smarty_internal_compile_private_registered_function.php
index b3edb68d..7a4cbb7f 100644
--- a/libs/sysplugins/smarty_internal_compile_private_registered_function.php
+++ b/libs/sysplugins/smarty_internal_compile_private_registered_function.php
@@ -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;
}
}