Skip to content

Conversation

codders
Copy link
Contributor

@codders codders commented Jul 11, 2025

There is a quirky behaviour of the libxml integration in PHP 8.1.21 that results in "DOMException: Not Found Error" or in some cases a SEGFAULT when nodes are appended to the DOM adjacent to nodes that are being / have been removed from the DOM.

While we wait for our infrastructure (and especially mwcli (T388411)) to move away from the version that has the bug, add a workaround so that we can make progress with MEX development.

Bug: T398821

@codders codders requested a review from lucaswerkmeister July 11, 2025 09:28
@codders codders force-pushed the bugfix/workaround-libxml-issue-20250711 branch from 8886044 to faf6aa7 Compare July 11, 2025 09:29
There is a quirky behaviour of the libxml integration in PHP 8.1.21
that results in "DOMException: Not Found Error" or in some cases a
SEGFAULT when nodes are appended to the DOM adjacent to nodes that
are being / have been removed from the DOM.

While we wait for our infrastructure (and especially mwcli
(T388411)) to move away from the version that has the bug, add a
workaroud so that we can make progress with MEX development.

Bug: T398821
@codders codders force-pushed the bugfix/workaround-libxml-issue-20250711 branch from faf6aa7 to 7c3dcd8 Compare July 11, 2025 09:30
Comment on lines +163 to +165
foreach ( $children as $child ) {
$parent->appendChild( $child );
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$parent->append( ...$children ); also seems to work FWIW (tested on PHP 8.4.10 and 8.1.18).

@lucaswerkmeister lucaswerkmeister merged commit 89cd93b into master Jul 11, 2025
8 checks passed
@lucaswerkmeister lucaswerkmeister deleted the bugfix/workaround-libxml-issue-20250711 branch July 11, 2025 09:44
@codders codders restored the bugfix/workaround-libxml-issue-20250711 branch July 17, 2025 10:49
@codders codders deleted the bugfix/workaround-libxml-issue-20250711 branch July 17, 2025 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants