aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzzhongwei2012-11-15 03:41:04 (EST)
committerzzhongwei2012-11-15 03:42:11 (EST)
commitdee1e986d4e2e0a27e9b436b56761a7ccce195fe (patch)
tree3abbf7ad5505a396a4fdc8efdde53fc92c0d054e
parentfd16d4108dd94190f103d3003b187bac0b5b0a8d (diff)
downloadorg.eclipse.pdt-dee1e986d4e2e0a27e9b436b56761a7ccce195fe.zip
org.eclipse.pdt-dee1e986d4e2e0a27e9b436b56761a7ccce195fe.tar.gz
org.eclipse.pdt-dee1e986d4e2e0a27e9b436b56761a7ccce195fe.tar.bz2
394361: Get NPE when create Zend Framework Example Project
https://bugs.eclipse.org/bugs/show_bug.cgi?id=394361
-rw-r--r--plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/facet/PHPFacets.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/facet/PHPFacets.java b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/facet/PHPFacets.java
index b86412a..b3e5cbc 100644
--- a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/facet/PHPFacets.java
+++ b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/facet/PHPFacets.java
@@ -19,6 +19,7 @@ import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.*;
import org.eclipse.php.internal.core.PHPCorePlugin;
import org.eclipse.php.internal.core.PHPVersion;
+import org.eclipse.php.internal.core.project.ProjectOptions;
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
import org.eclipse.wst.common.project.facet.core.IProjectFacet;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
@@ -136,6 +137,9 @@ public class PHPFacets {
* @return the php facets version
*/
public static IProjectFacetVersion convertToFacetVersion(PHPVersion version) {
+ if (version == null) {
+ version = ProjectOptions.getDefaultPhpVersion();
+ }
IProjectFacet phpFacet = ProjectFacetsManager
.getProjectFacet(PHPFacetsConstants.PHP_COMPONENT);
switch (version) {