View Issue Details

IDProjectCategoryView StatusLast Update
0002094XdebugStep Debuggingpublic2022-05-16 16:21
Reportersupra_theis Assigned Toderick  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionduplicate 
Product Version3.1.2 
Summary0002094: Public static property with closure data type have double facet XML attribute
Description

Similar to issue https://bugs.xdebug.org/view.php?id=2011

Xdebug disconnected with message: [xmldom fatalError] Attribute facet redefined

Steps To Reproduce

Set breakpoint at line 11 in the attached test file.

Additional Information

XML log from vscode:

<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1"
xmlns:xdebug="https://xdebug.org/dbgp/xdebug&quot; command="context_get" transaction_id="11" context="0">
<property name="::" fullname="::" type="object" classname="Test" children="1" numchildren="1">
<property name="::bar" fullname="::bar" type="object" facet="closure" classname="Closure" children="0" numchildren="1" page="0" pagesize="32" facet="static public">
<property facet="virtual readonly" name="{closure}" type="array" children="1" page="0" pagesize="2" numchildren="1">
<property facet="readonly" name="function" type="string"><![CDATA[{closure}]]></property>
</property>
</property>
</property>
</response>

TagsNo tags attached.
Operating System
PHP Version8.0.10-8.0.19

Relationships

duplicate of 0002055 closedderick Debugger creates XML with double facet attribute 

Activities

supra_theis

2022-05-16 15:07

reporter  

test.php (256 bytes)   
<?php

class Test {
    public static $bar;

    public static function foo($closure) {
        static::$bar = $closure;
    }

    public static function baz() {
        (static::$bar)();
    }
}

Test::foo(function(){
    echo "called";
});

Test::baz();
test.php (256 bytes)   

derick

2022-05-16 15:43

administrator   ~0006301

Hi,

I think I have already fixed this one in (at least Git), but possibly also already in Xdebug 3.1.3. Can you please test with the latest Xdebug version (3.1.4)?

cheers,
Derick

supra_theis

2022-05-16 15:52

reporter   ~0006302

Yes, I just install Xdebug 3.14 and it the problem is gone. Thank you.

derick

2022-05-16 16:21

administrator   ~0006303

Okay, I'm closing it then, but I did add a test case: https://github.com/xdebug/xdebug/pull/839

Thanks for the easy to reproduce case!

cheers,
Derick

Issue History

Date Modified Username Field Change
2022-05-16 15:07 supra_theis New Issue
2022-05-16 15:07 supra_theis File Added: test.php
2022-05-16 15:43 derick Assigned To => derick
2022-05-16 15:43 derick Status new => feedback
2022-05-16 15:43 derick Note Added: 0006301
2022-05-16 15:52 supra_theis Note Added: 0006302
2022-05-16 15:52 supra_theis Status feedback => assigned
2022-05-16 16:21 derick Status assigned => resolved
2022-05-16 16:21 derick Resolution open => duplicate
2022-05-16 16:21 derick Note Added: 0006303
2022-05-16 16:21 derick Relationship added duplicate of 0002055