diff --git a/smarty_plugins/function.template_types.php b/smarty_plugins/function.template_types.php
index e12abce..ab04871 100644
--- a/smarty_plugins/function.template_types.php
+++ b/smarty_plugins/function.template_types.php
@@ -28,7 +28,7 @@ function smarty_function_template_types($params, &$smarty)
$lines[] = "";
- foreach ($template_types as $group_name => $group_section) {
+ foreach ($template_types as $group_name => $group_sections) {
$lines[] = "