summaryrefslogtreecommitdiff
path: root/lib/smarty3/plugins/modifiercompiler.default.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/smarty3/plugins/modifiercompiler.default.php')
-rw-r--r--lib/smarty3/plugins/modifiercompiler.default.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/smarty3/plugins/modifiercompiler.default.php b/lib/smarty3/plugins/modifiercompiler.default.php
index 2c4c00a..ae886c4 100644
--- a/lib/smarty3/plugins/modifiercompiler.default.php
+++ b/lib/smarty3/plugins/modifiercompiler.default.php
@@ -5,11 +5,10 @@
* @package Smarty
* @subpackage PluginsModifierCompiler
*/
-
/**
* Smarty default modifier plugin
- * Type: modifier<br>
- * Name: default<br>
+ * Type: modifier
+ * Name: default
* Purpose: designate default value for empty variables
*
* @link http://www.smarty.net/manual/en/language.modifier.default.php default (Smarty online manual)
@@ -25,11 +24,9 @@ function smarty_modifiercompiler_default($params)
if (!isset($params[ 1 ])) {
$params[ 1 ] = "''";
}
-
array_shift($params);
foreach ($params as $param) {
$output = '(($tmp = @' . $output . ')===null||$tmp===\'\' ? ' . $param . ' : $tmp)';
}
-
return $output;
}