aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzzhongwei2013-03-11 03:35:00 (EDT)
committerzzhongwei2013-03-11 03:35:00 (EDT)
commitd25046f1e6d57e90b83cd083181cae8b1e9fb26a (patch)
treed6c85d536678bcc3cf0d5d9fa84c8fd177e3964c
parentd0bba0b3a93a9621526e8c563ae0bf1cd7dea77a (diff)
downloadorg.eclipse.pdt-d25046f1e6d57e90b83cd083181cae8b1e9fb26a.zip
org.eclipse.pdt-d25046f1e6d57e90b83cd083181cae8b1e9fb26a.tar.gz
org.eclipse.pdt-d25046f1e6d57e90b83cd083181cae8b1e9fb26a.tar.bz2
fix NPE
-rw-r--r--plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/preferences/PHPCoreOptionsConfigurationBlock.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/preferences/PHPCoreOptionsConfigurationBlock.java b/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/preferences/PHPCoreOptionsConfigurationBlock.java
index 667288e..4e17335 100644
--- a/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/preferences/PHPCoreOptionsConfigurationBlock.java
+++ b/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/preferences/PHPCoreOptionsConfigurationBlock.java
@@ -50,8 +50,11 @@ public abstract class PHPCoreOptionsConfigurationBlock extends
if (fProject != null) {
final Key versionKey = getPHPCoreKey(Keys.PHP_VERSION);
// synch the php facets version if needed
- final String newVersion = versionKey.getStoredValue(currContext,
- fManager);
+ String newVersion = versionKey
+ .getStoredValue(currContext, fManager);
+ if (newVersion == null) {
+ newVersion = getValue(versionKey);
+ }
final IStatus status = PHPFacets.setFacetedVersion(fProject,
PHPVersion.byAlias(newVersion));
if (!status.isOK()) {