aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacek Pospychala2012-11-15 02:39:11 (EST)
committerJacek Pospychala2012-11-15 02:40:44 (EST)
commit679ada6589a7ad829ffc560e5a30dd63955e0700 (patch)
treecc62db0ca09903a733e9811599066d8c4dc49c37
parentd91cb30f8c147379e80d99bf35dd4e28d0a13fd3 (diff)
downloadorg.eclipse.pdt-679ada6589a7ad829ffc560e5a30dd63955e0700.zip
org.eclipse.pdt-679ada6589a7ad829ffc560e5a30dd63955e0700.tar.gz
org.eclipse.pdt-679ada6589a7ad829ffc560e5a30dd63955e0700.tar.bz2
NullPointerException when getPHPVersion() returns null
-rw-r--r--plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/wizards/PHPProjectCreationWizard.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/wizards/PHPProjectCreationWizard.java b/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/wizards/PHPProjectCreationWizard.java
index 2a90a96..b22a9c6 100644
--- a/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/wizards/PHPProjectCreationWizard.java
+++ b/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/wizards/PHPProjectCreationWizard.java
@@ -21,7 +21,9 @@ import org.eclipse.dltk.ui.DLTKUIPlugin;
import org.eclipse.dltk.ui.wizards.NewElementWizard;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.php.internal.core.PHPCorePlugin;
+import org.eclipse.php.internal.core.PHPVersion;
import org.eclipse.php.internal.core.facet.PHPFacets;
+import org.eclipse.php.internal.core.project.ProjectOptions;
import org.eclipse.php.internal.ui.PHPUIMessages;
import org.eclipse.php.internal.ui.util.PHPPluginImages;
import org.eclipse.ui.INewWizard;
@@ -103,9 +105,12 @@ public class PHPProjectCreationWizard extends NewElementWizard implements
selectAndReveal(fLastPage.getScriptProject().getProject());
IProject project = fLastPage.getScriptProject().getProject();
+ PHPVersion version = fFirstPage.getPHPVersionValue();
+ if (version == null) {
+ version = ProjectOptions.getDefaultPhpVersion();
+ }
try {
- PHPFacets.createFacetedProject(project,
- fFirstPage.getPHPVersionValue(),
+ PHPFacets.createFacetedProject(project, version,
new NullProgressMonitor());
} catch (CoreException ex) {
PHPCorePlugin.log(ex);