aboutsummaryrefslogtreecommitdiffstats
path: root/include/smarty/libs
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2015-12-20 14:54:07 +0100
committerplegall <plg@piwigo.org>2015-12-20 14:54:07 +0100
commit8cd9c6602c950955d69592a62320330deb934b93 (patch)
tree4f525afa70318a1188c239b0ec11cefdf8141913 /include/smarty/libs
parent3282ddbe2ea305edbb0b3ae84b6860c0d90ab072 (diff)
changes on Smarty side breaks all prefilter in Piwigo
It would be better to modify the way template.class.php registers prefilters but I didn't find the appropriate data structure.
Diffstat (limited to 'include/smarty/libs')
-rw-r--r--include/smarty/libs/sysplugins/smarty_internal_runtime_filterhandler.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/smarty/libs/sysplugins/smarty_internal_runtime_filterhandler.php b/include/smarty/libs/sysplugins/smarty_internal_runtime_filterhandler.php
index 9af266758..4b664c38e 100644
--- a/include/smarty/libs/sysplugins/smarty_internal_runtime_filterhandler.php
+++ b/include/smarty/libs/sysplugins/smarty_internal_runtime_filterhandler.php
@@ -60,7 +60,11 @@ class Smarty_Internal_Runtime_FilterHandler
// loop over registered filters of specified type
if (!empty($template->smarty->registered_filters[$type])) {
foreach ($template->smarty->registered_filters[$type] as $key => $name) {
- $content = call_user_func($template->smarty->registered_filters[$type][$key], $content, $template);
+ if (is_array($template->smarty->registered_filters[$type][$key])) {
+ $content = call_user_func($template->smarty->registered_filters[$type][$key], $content, $template);
+ } else {
+ $content = $template->smarty->registered_filters[$type][$key]($content, $template);
+ }
}
}
// return filtered output