6 * @subpackage PluginsModifierCompiler
10 * Smarty default modifier plugin
13 * Purpose: designate default value for empty variables
15 * @link http://www.smarty.net/manual/en/language.modifier.default.php default (Smarty online manual)
18 * @param array $params parameters
20 * @return string with compiled code
22 function smarty_modifiercompiler_default($params)
25 if (!isset($params[1])) {
30 foreach ($params as $param) {
31 $output = '(($tmp = @' . $output . ')===null||$tmp===\'\' ? ' . $param . ' : $tmp)';