- 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:
uwetews
2016-09-15 03:23:04 +02:00
parent 424dca6d24
commit 58b6472d4f
4 changed files with 7 additions and 5 deletions

View File

@@ -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;
}
}