Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html	(revision 7350)
+++ /CKEditor/trunk/CHANGES.html	(revision 7351)
@@ -46,4 +46,5 @@
 	<ul>
 		<li><a href="http://dev.ckeditor.com/ticket/8333">#8333</a> : Allow to close the dialogs with Esc key even if there's no Cancel button.</li>
+		<li><a href="http://dev.ckeditor.com/ticket/8644">#8644</a> : Missing variable declaration in the dialog plugin.</li>
 	</ul>
 	<h3>
Index: /CKEditor/trunk/_source/plugins/dialog/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/dialog/plugin.js	(revision 7350)
+++ /CKEditor/trunk/_source/plugins/dialog/plugin.js	(revision 7351)
@@ -139,5 +139,8 @@
 			defaultDefinition = CKEDITOR.tools.clone( defaultDialogDefinition ),
 			buttonsOrder = editor.config.dialog_buttonsOrder || 'OS',
-			dir = editor.lang.dir;
+			dir = editor.lang.dir,
+			tabsToRemove = {},
+			i,
+			processed;
 
 			if ( ( buttonsOrder == 'OS' && CKEDITOR.env.mac ) ||    // The buttons in MacOS Apps are in reverse order (#4750)
@@ -220,5 +223,4 @@
 			, editor ).definition;
 
-		var tabsToRemove = {};
 		// Cache tabs that should be removed.
 		if ( !( 'removeDialogTabs' in editor._ ) && editor.config.removeDialogTabs )
@@ -393,5 +395,4 @@
 		this.changeFocus = changeFocus;
 
-		var processed;
 
 		function focusKeydownHandler( evt )
@@ -559,5 +560,5 @@
 
 		// Insert the tabs and contents.
-		for ( var i = 0 ; i < definition.contents.length ; i++ )
+		for ( i = 0 ; i < definition.contents.length ; i++ )
 		{
 			var page = definition.contents[i];
