aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/smarty/smarty/libs/sysplugins/smarty_internal_method_registerplugin.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/smarty/smarty/libs/sysplugins/smarty_internal_method_registerplugin.php')
-rw-r--r--vendor/smarty/smarty/libs/sysplugins/smarty_internal_method_registerplugin.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_method_registerplugin.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_method_registerplugin.php
index f987f6da5..ed18d84bb 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_method_registerplugin.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_method_registerplugin.php
@@ -48,6 +48,8 @@ class Smarty_Internal_Method_RegisterPlugin
throw new SmartyException("Plugin tag '{$name}' already registered");
} elseif (!is_callable($callback)) {
throw new SmartyException("Plugin '{$name}' not callable");
+ } elseif ($cacheable && $cache_attr) {
+ throw new SmartyException("Cannot set caching attributes for plugin '{$name}' when it is cacheable.");
} else {
$smarty->registered_plugins[ $type ][ $name ] = array($callback, (bool)$cacheable, (array)$cache_attr);
}