View Issue Details

IDProjectCategoryView StatusLast Update
0001048Xdebug(No Category)public2014-05-20 00:00
ReporterSvetlanaZemAssigned Toderick 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version2.2.1 
Target VersionFixed in Version2.2.6 
Summary0001048: Can not get $GLOBAL variable by property_value on function context
DescriptionWhile debugging code:
<?php

function foo() {
    $GLOBALS['CACHE'] = str_pad('', 1024, 'l') . 'k';
    xdebug_break(); // 1
    echo 1;
}

foo();
xdebug_break(); // 2
echo 1;

property_value -n $GLOBAL['CACHE'] is available only in global context (xdebug_break(); // 2). The command will be responced by "can not get property" if it was called from function (xdebug_break(); // 1).

Log file is attached.
TagsNo tags attached.
Operating System
PHP Version5.4.10-5.4.14

Activities

SvetlanaZem

2014-04-14 14:22

reporter  

global_value_xdebug.log (43,619 bytes)

derick

2014-05-19 12:07

administrator   ~0002812

There is indeed a bug, or rather, something that is not implemented. The property_value implementation misses support for -c, so it doesn't use the superglobals context. This should be an easy fix though.

Issue History

Date Modified Username Field Change
2014-04-14 14:22 SvetlanaZem New Issue
2014-04-14 14:22 SvetlanaZem File Added: global_value_xdebug.log
2014-05-19 12:07 derick Note Added: 0002812
2014-05-19 12:07 derick Assigned To => derick
2014-05-19 12:07 derick Status new => acknowledged
2014-05-20 00:00 derick Status acknowledged => closed
2014-05-20 00:00 derick Resolution open => fixed
2014-05-20 00:00 derick Fixed in Version => 2.2.6
2016-07-31 12:35 derick Category Debug client (console) => debugclient (debugging tool)
2016-07-31 12:35 derick Category debugclient (debugging tool) => (No Category)