Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000987XdebugFeature/Change requestpublic2013-10-17 17:042013-11-25 21:58
Reporterdm 
Assigned Toderick 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version2.2.0 
Target VersionFixed in Version2.2.4 
Summary0000987: Hidden property names not shown
DescriptionUsing array-object cast, we can create "hidden" variables/properties (explained here: http://nikic.github.io/2012/03/28/Understanding-PHPs-internal-array-implementation.html#the_symtable [^]).

When using xdebug to var_dump such object, property name/variable key is missing.

When using regular var_dump, it's shown properly.

Steps To Reproduce<?php

$object = (object) ['key' => 'value', 1 => 0];

var_dump($object);
Additional InformationShould produce something like:

object(stdClass)#1 (2) { ["key"]=> string(5) "value" [1]=> int(0) }

Instead we get (missing key 1):

object(stdClass)[1]
  public 'key' => string 'value' (length=5)
  int 0

Casting $object to array shows that property/key/variable really exists.
TagsNo tags attached.
Operating System
PHP Version5.4.10-5.4.14
Attached Files

- Relationships

-  Notes
(0002594)
derick (administrator)
2013-10-22 16:49

It's not only var_dump, and it needs to be fixed for other cases too. I'm on it though!
(0002621)
derick (administrator)
2013-11-25 21:58

Fixed in GIT.

- Issue History
Date Modified Username Field Change
2013-10-17 17:04 dm New Issue
2013-10-22 16:49 derick Note Added: 0002594
2013-10-22 16:49 derick Assigned To => derick
2013-10-22 16:49 derick Status new => assigned
2013-11-25 21:58 derick Note Added: 0002621
2013-11-25 21:58 derick Status assigned => closed
2013-11-25 21:58 derick Resolution open => fixed
2013-11-25 21:58 derick Fixed in Version => 2.2.4


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker