From 5e7fa5bbb44441711097653a774d2fd4d2ab69db Mon Sep 17 00:00:00 2001 From: robekras Date: Mon, 24 Oct 2005 16:54:51 +0000 Subject: [PATCH] 1) Did not check for an empty variable list in getVariables. --- .../phpdt/internal/debug/core/PHPDBGInterface.java | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDBGInterface.java b/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDBGInterface.java index 9d40c3f..6405a9e 100644 --- a/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDBGInterface.java +++ b/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDBGInterface.java @@ -26,8 +26,6 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.debug.core.DebugException; -import java.io.RandomAccessFile; - /** * The interface object are created by the proxy * @@ -427,14 +425,15 @@ public class PHPDBGInterface { evalStr = new PHPDBGEvalString (stack, serGlobals); // Process serialized variables DBGVarList = evalStr.getVariables (); - PHPVariable var = (PHPVariable) DBGVarList.get (0); + if (DBGVarList.size () > 0) { // Did we get back variables? + PHPVariable var = (PHPVariable) DBGVarList.get (0); // Yes, then get the first PHPVariable - if (var.getName ().equals ("")) { // The eclipse variable view cannot handle Variables which have an empty name + if (var.getName ().equals ("")) { // The eclipse variable view cannot handle Variables which have an empty name // when it comes to variable tree restore operation. Without a name, no restore! - var.setName (" "); // Give a name to the variable root node. Even if it is only a space :.) - } // TODO the best would be to remove the empty root node, but this would + var.setName (" "); // Give a name to the variable root node. Even if it is only a space :-) + } // TODO the best would be to remove the empty root node, but this would // require a understanding and reworking of the PHPDBGEvalstring class. - + } return DBGVarList; // Return the variables as list } -- 1.7.1