aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/smarty/smarty/libs/plugins/modifiercompiler.json_encode.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/smarty/smarty/libs/plugins/modifiercompiler.json_encode.php')
-rw-r--r--vendor/smarty/smarty/libs/plugins/modifiercompiler.json_encode.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/vendor/smarty/smarty/libs/plugins/modifiercompiler.json_encode.php b/vendor/smarty/smarty/libs/plugins/modifiercompiler.json_encode.php
new file mode 100644
index 000000000..629277f28
--- /dev/null
+++ b/vendor/smarty/smarty/libs/plugins/modifiercompiler.json_encode.php
@@ -0,0 +1,11 @@
+<?php
+
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifierCompiler
+ */
+function smarty_modifiercompiler_json_encode($params) {
+ return 'json_encode(' . $params[0] . (isset($params[1]) ? ', (int) ' . $params[1] : '') . ')';
+}