You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Segmentation fault (access null pointer) in ext/dom/token_list.c #16763
/php-src/ext/dom/token_list.c:204:7: runtime error: member access within null pointer of type 'php_libxml_node_ptr' (aka 'struct _php_libxml_node_ptr')
The Dom\Element class is normally not constructible, it achieves this by having a private final constructor that throws. The fact that Reflection allows to construct it anyway is imho a design fault of Reflection, not a bug in DOM. I refuse to fix this in DOM as it would just work around the stupid design of allowing Reflection to construct internal classes with a constructor without actually calling it. There's likely more issues with DOM when you do stuff like this.
Same root cause as #16217, so I'm closing this as a duplicate.
Activity
ndossche commentedon Nov 12, 2024
The
Dom\Elementclass is normally not constructible, it achieves this by having a private final constructor that throws. The fact that Reflection allows to construct it anyway is imho a design fault of Reflection, not a bug in DOM. I refuse to fix this in DOM as it would just work around the stupid design of allowing Reflection to construct internal classes with a constructor without actually calling it. There's likely more issues with DOM when you do stuff like this.Same root cause as #16217, so I'm closing this as a duplicate.