do a check for no environment values
authorcperkonig <cperkonig>
Tue, 4 Oct 2005 21:12:57 +0000 (21:12 +0000)
committercperkonig <cperkonig>
Tue, 4 Oct 2005 21:12:57 +0000 (21:12 +0000)
net.sourceforge.phpeclipse.xdebug.core/src/net/sourceforge/phpeclipse/xdebug/php/launching/PHPLaunchConfigurationDelegate.java

index 484f75a..509d40d 100644 (file)
@@ -85,9 +85,13 @@ public class PHPLaunchConfigurationDelegate extends LaunchConfigurationDelegate
 //                     nativeEnvVars.put("XDEBUG_CONFIG", "idekey=xdebug_test remote_enable=1");
 //             }
                if (mode.equals(ILaunchManager.DEBUG_MODE)) {
-                       String[] env = new String[envp.length+1];
-                       for(int i=0;i<envp.length;i++)
-                               env[i+1]=envp[i];
+                       String[] env;
+                       if (envp!=null) {
+                               env = new String[envp.length+1];
+                               for(int i=0;i<envp.length;i++)
+                                       env[i+1]=envp[i];
+                       } else
+                               env = new String[1];
                        env[0]="XDEBUG_CONFIG=idekey=xdebug_test remote_enable=1";
                        envp=env;
                }