View Issue Details

IDProjectCategoryView StatusLast Update
0000910XdebugUncategorizedpublic2013-03-09 21:59
Reporterspeller Assigned Toderick  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version2.2.1 
Summary0000910: Exceptions or warnings when debugging DOMAttr objects
Description

When trying to step over lines with variables with DOMAttr objects I always get exceptions or warnings "Not yet implemented". When tested in real application I got exceptions. But when reproduced it in test script I got warnings in PHP output.

Steps To Reproduce

Execute attached test.php file. You will get clean output:

attr value

Now set breakpoint to line 16 "echo $name, ' ', $attr->value;" and start debugging. After execution stops on the breakpoint just continue execution and allow the script to complete. Now you will have the following script output:

Warning: main(): Not yet implemented in C:\usr\work\vlru\comments\web\test.php on line 16
attr value

Additional Information

PHPStorm 5.0.4 IDE, PHP 5.4.7 32bit, Windows 7 x64

TagsNo tags attached.
Attached Files
test.php (395 bytes)
Operating SystemWindows 7 x64
PHP Version5.4.4

Relationships

duplicate of 0000913 resolvedderick PHP 5.4.1 / 5.3.11 "Added debug info handler to DOM objects." not supported 

Activities

hakre

2013-01-05 17:07

reporter   ~0002411

Last edited: 2013-01-05 17:11

This is not a bug, but your test.php code stands a little in the way to see that directly. See the following example:


<?php
$doc = new DOMDocument();
$doc->loadXML('<element attr="value"/>');
$element = $doc->documentElement;
foreach ($element->attributes as $name => $attr) {
$attr; 1 == 1; ### TOGGLE BREAKPOINT ON THIS LINE ###
echo $name, ' schemaTypeInfo: ', $attr->schemaTypeInfo;
}

The important part is: xdebug evaluates the variables if there is a breakpoint. And you actually want that despite the warning in this case. Because $attr is an object all it's known properties are looked into, including $attr->schemaTypeInfo which gives you this standard warning - as the next line shows because it triggers it with and without xdebug.

So when you run over this or similar problems, please double check what is causing the warning specifically.

http://lxr.php.net/xref/PHP_5_4/ext/dom/attr.c#248

derick

2013-03-09 21:59

administrator   ~0002438

Duplicated with 913, which works just fine for me. I've committed a test case.

Issue History

Date Modified Username Field Change
2012-12-14 01:47 speller New Issue
2012-12-14 01:47 speller File Added: test.php
2013-01-05 17:07 hakre Note Added: 0002411
2013-01-05 17:08 hakre Note Edited: 0002411
2013-01-05 17:08 hakre Note Edited: 0002411
2013-01-05 17:09 hakre Note Edited: 0002411
2013-01-05 17:09 hakre Note Edited: 0002411
2013-01-05 17:09 hakre Note Edited: 0002411
2013-01-05 17:09 hakre Note Edited: 0002411
2013-01-05 17:10 hakre Note Edited: 0002411
2013-01-05 17:10 hakre Note Edited: 0002411
2013-01-05 17:11 hakre Note Edited: 0002411
2013-01-05 17:11 hakre Note Edited: 0002411
2013-03-09 21:59 derick Note Added: 0002438
2013-03-09 21:59 derick Relationship added duplicate of 0000913
2013-03-09 21:59 derick Status new => resolved
2013-03-09 21:59 derick Resolution open => fixed
2013-03-09 21:59 derick Assigned To => derick
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)
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:38 derick Category Variable Display => Uncategorized