Fix #1368081: Variable not initialized does not work for array access
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / wizards / PHPFileWizardPage.java
index 1b64440..ec91d2b 100644 (file)
@@ -138,10 +138,13 @@ public class PHPFileWizardPage extends WizardPage {
         ResourcesPlugin.getWorkspace().getRoot(), false, PHPWizardMessages
             .getString("WizardPage.selectNewFileContainer"));
     if (dialog.open() == ContainerSelectionDialog.OK) {
-      Object[] result = dialog.getResult();
-      if (result.length == 1) {
-        IContainer container = (IContainer) result[0];
-        containerText.setText(container.getFullPath().toString());
+      Object[] results = dialog.getResult();
+      if (results.length == 1) {
+         Object result=results[0];
+         if (result instanceof IPath) {
+                 IPath ipath = (IPath) result;
+                 containerText.setText(ipath.toString());
+         }
       }
     }
   }