[php-src] PR #25755: Guard namespace prefix lookup for non-element nodes

From: Date: Wed, 25 Nov 2026 18:25:30 +0000
Subject: [php-src] PR #25755: Guard namespace prefix lookup for non-element nodes
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-41013@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/25755 Author: imattas ## Description Dom\Node::lookupPrefix() can reach the namespace-prefix helper with a non-element parent for text nodes inside DTD entity declarations. The helper reads element-specific namespace and attribute fields before checking the node type. Return NULL for non-elements and add a regression test for this case. ## Testing - The minimal XML reproducer crashes before the guard and returns NULL after it in a local ASan build of PHP 8.7.0-dev. - ext/dom/tests/modern/spec/Node_lookupPrefix.phpt passes (1 test).

« previous php.git-pulls (#41013) next »