diff --git a/libraries/Smarty/libs/debug.tpl b/libraries/Smarty/libs/debug.tpl
index 12eef0ffdbf046fb9daf2b6189ed35f2148b654f..7ba49116d2d6fb3e6e4c8bcde7b3e326bd698263 100644
--- a/libraries/Smarty/libs/debug.tpl
+++ b/libraries/Smarty/libs/debug.tpl
@@ -127,7 +127,7 @@ td {
 {/capture}
 <script type="text/javascript">
 {$id = $template_name|default:''|md5}
-    _smarty_console = window.open("","console{$id}","width=680,height=600,resizable,scrollbars=yes");
+  var _smarty_console = window.open("","console{$id}","width=680,height=600,resizable,scrollbars=yes");
     _smarty_console.document.write("{$debug_output|escape:'javascript' nofilter}");
     _smarty_console.document.close();
 </script>