Skip to content

Commit 1857f83

Browse files
committed
Don't quote numeric keys in arrays
Ran into the issue on PHP, but should be the same for Perl. Per a WONTFIX in Xdebug's bug tracker, we shouldn't quote numeric keys in arrays when requesting them: https://bugs.xdebug.org/view.php?id=732 This fixes an error when trying to drill down into numeric keys.
1 parent 96e7825 commit 1857f83

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

plugin/python/vdebug/dbgp.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -669,8 +669,12 @@ def _determine_displayname(self,node):
669669
if self.language == 'php' or \
670670
self.language == 'perl':
671671
if self.parent.type == 'array':
672-
self.display_name = self.parent.display_name + \
673-
"['%s']" % node.get('name')
672+
if node.get('name').isdigit():
673+
self.display_name = self.parent.display_name + \
674+
"[%s]" % node.get('name')
675+
else:
676+
self.display_name = self.parent.display_name + \
677+
"['%s']" % node.get('name')
674678
else:
675679
self.display_name = self.parent.display_name + \
676680
"->"+node.get('name')

0 commit comments

Comments
 (0)