View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0001138||Xdebug||Usage problems (Wrong Results)||public||2015-04-09 13:13||2016-11-29 23:55|
|Status||resolved||Resolution||no change required|
|Target Version||Fixed in Version|
|Summary||0001138: Xdebug is not able to evaluate arrays|
|Description||If i setup a Project with CakePHP3 under PHPStorm8, Netbeans8 ... with MAMP (Simple MAC LAMP alternative), i'm able to set a breakpoint, but on lots of values i receive 'can not get property'. As it happens with PHPStorm AND Netbeans, it seems like it is a problem with Xdebug. I tried 2.2, 2.3.2 and after it still failed, i install 3.0.0-dev from git. still same same.|
I have a screenshot of the debugging state. You see, there are values being evaluated, but others aren't. The Object, where i discovered this is an "Entity Object"
i talked to some developers of cakephp, and they told me that "properties" or "accessible" are simple and plain old php arrays.
|Steps To Reproduce||OSX|
generate easy Entity Object in one of the controllers
e.g. $e = new Entity(['id'=>5]);
set a breakpoint after it, and you'll see that not all values are accessible.
|Tags||No tags attached.|
Could you perhaps come up with a lot simpler reproduce case? As a preference, just a *single* script without dependencies.
If not, as I have no mac and hence no MAMP, and I don't know CakePHP, I need a reproducible package. I doubt it's related to OSX/MAMP though, so if you can pack up something that I can easily "unpack and run", *and* provide a "remote debugging log" (see http://xdebug.org/docs/all_settings#remote_log), then I can perhaps find and fix this.
you find a webproject example here. http://184.108.40.206/private/xdebug.zip
simply download & unpack
I can run this - and set the breakpoint at the instructed line. However, the screenshot that you posted shows $initFunctions being open, which has the "properties" or "accessible" properties. But in the code that you gave me, there is no such variable at all.
In the context of the $e variable, _accessors and _properties "work for me". I'll add a screenshot too.
screenshot.png (114,159 bytes)
screenshot.png (114,159 bytes)
yes you are right, the code is sent you is just a basic example.
here is my output of $e
||I see something fishy going on, even *without* xdebug loaded when requesting index.php - what is your exact PHP version?|
||I think I found a bug in PHP here - that I can reproduce even when Xdebug is loaded. Can I pass your "xdebug.zip" onwards into the PHP.net bugs system?|
||my exact php version is 5.6.2|
are there any efforts concering the php bug ;) ?
||its strange, that _properties "works" for you.|
oh my f***** god, it was an issue with php5.6.x. I ran the project with 5.5.18, and properties appear as normal . so it is obviuosly a bug with 5.6
thanks a lot !!!
||I'm closing this, as it's expected to be a problem with PHP itself.|
|2015-04-09 13:13||duderion||New Issue|
|2015-04-09 13:16||derick||Note Added: 0003060|
|2015-04-09 13:16||derick||Assigned To||=> derick|
|2015-04-09 13:16||derick||Status||new => feedback|
|2015-04-09 13:39||duderion||Note Added: 0003061|
|2015-04-09 13:39||duderion||Status||feedback => assigned|
|2015-04-09 13:53||derick||Note Added: 0003062|
|2015-04-09 13:53||derick||File Added: screenshot.png|
|2015-04-09 14:26||duderion||Note Added: 0003063|
|2015-04-09 14:46||derick||Note Added: 0003064|
|2015-04-09 20:07||derick||Note Added: 0003065|
|2015-04-15 13:45||duderion||Note Added: 0003069|
|2015-04-15 13:45||duderion||Note Added: 0003070|
|2015-04-28 09:19||duderion||Note Added: 0003074|
|2015-05-02 15:12||duderion||Note Added: 0003076|
|2015-05-02 16:27||duderion||Note Added: 0003077|
|2016-07-31 12:36||derick||Category||Usage problems => Usage problems (Crashes)|
|2016-07-31 12:38||derick||Category||Usage problems (Crashes) => Usage problems (Wrong Results)|
|2016-11-29 23:55||derick||Note Added: 0003857|
|2016-11-29 23:55||derick||Status||assigned => resolved|
|2016-11-29 23:55||derick||Resolution||open => no change required|