From 5f834e3046933894c731637b2eceba543aa075ab Mon Sep 17 00:00:00 2001 From: robekras Date: Mon, 6 Jan 2014 11:50:40 +0100 Subject: [PATCH] 1) Fixed '$' preceding of PHP variables (this file was missed in the previous commit). Signed-off-by: robekras --- .../xdebug/php/model/XDebugVariable.java | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/net.sourceforge.phpeclipse.xdebug.core/src/net/sourceforge/phpeclipse/xdebug/php/model/XDebugVariable.java b/net.sourceforge.phpeclipse.xdebug.core/src/net/sourceforge/phpeclipse/xdebug/php/model/XDebugVariable.java index 58bb38f..5da692e 100644 --- a/net.sourceforge.phpeclipse.xdebug.core/src/net/sourceforge/phpeclipse/xdebug/php/model/XDebugVariable.java +++ b/net.sourceforge.phpeclipse.xdebug.core/src/net/sourceforge/phpeclipse/xdebug/php/model/XDebugVariable.java @@ -49,7 +49,14 @@ public class XDebugVariable extends XDebugElement implements IVariable { String name = PHPDebugUtils.getAttributeValue (property, "name"); // Get the name of the variable (XDebug submits the name without the '$' prefix) if (fParent == null) { - fName = "$" + name; // Prepend the variable 'short' name with the php variable prefix '$' + if (!name.isEmpty ()) { // If we have a name + if (name.charAt(0) == '$') { // If variable name has already a '$' in front (newer version of XDebug) + fName = name; // take the name as is + } + else { + fName = "$" + name; // if not, prepend the variable 'short' name with the php variable prefix '$' + } + } } else { if (fParent.isArray ()) { -- 1.7.1