View Issue Details

IDProjectCategoryView StatusLast Update
0001551XdebugUncategorizedpublic2019-02-15 15:10
Reporteraperez Assigned Toderick  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version2.6.0 
Target Version2.7.0Fixed in Version2.7.0RC2 
Summary0001551: Property with value null is not represented well
Description

An object with property named null will be possible to see the data there but with bad values, the image attached you can see the null property name is converted to 5381 whilst the value is not be possible to be get.

According to use var_dump, json_encode/json_decode, serialize/unserialize the value is $ or null if you use a foreach. So the behaviour is correct. But i don't know if it is that we want.

Could you check the property will be able to see?

Steps To Reproduce

Code to reproduce the issue

$object = (object) [
null => $array = [1,2,3],
0 => [ 'a', 'l', '3' ],
1=> [ 'p', 'h', ‘p', ‘ ‘, ‘r’, ‘o’, ‘c’, k’, ‘s’, ‘\0’ ],
'funcion' => function () use ($array) {
echo 'Valor del array innacesible: ' ,var_export($array, true), PHP_EOL;
}
];
$array = null;

TagsNo tags attached.
Attached Files
Operating SystemWindows 10
PHP Version7.2.0-7.2.4

Activities

aperez

2018-05-16 11:09

reporter   ~0004653

Last edited: 2018-05-17 14:36

Please take in account the steps code to reproduce the issue are bad, they should be simple quotes. Sorry i cannot edit the report.

A note is possible to be modified so i am going to write here the correct:

$object = (object) [
null => $array = [1,2,3],
0 => [ 'a', 'l', '3' ],
1=> [ 'p', 'h', 'p', ' ', 'r', 'o', 'c', 'k', 's', '\0' ],
'funcion' => function () use ($array) {
echo 'Valor del array innacesible: ' ,var_export($array, true), PHP_EOL;
}
];
$array = null;

Thanks!

derick

2019-02-05 21:51

administrator   ~0004876

https://github.com/xdebug/xdebug/pull/446

Issue History

Date Modified Username Field Change
2018-05-16 11:05 aperez New Issue
2018-05-16 11:05 aperez File Added: property-null-bad-behaviour.png
2018-05-16 11:09 aperez Note Added: 0004653
2018-05-16 11:09 aperez Note Edited: 0004653
2018-05-17 14:36 aperez Note Edited: 0004653
2019-02-05 21:51 derick Note Added: 0004876
2019-02-05 21:51 derick Assigned To => derick
2019-02-05 21:51 derick Status new => assigned
2019-02-05 21:51 derick Target Version => 2.7.0
2019-02-05 22:36 derick Status assigned => closed
2019-02-05 22:36 derick Resolution open => fixed
2019-02-05 22:36 derick Fixed in Version => 2.7.0
2019-02-15 15:10 derick Fixed in Version 2.7.0 => 2.7.0RC2
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:38 derick Category Variable Display => Uncategorized