View Issue Details

IDProjectCategoryView StatusLast Update
0000910XdebugUncategorizedpublic2013-03-09 21:59
Reporterspeller Assigned To 
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.
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.