Signed-off-by: robekras <robert.kraske@weihenstephan.org>
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 ()) {