[php-src] PR #12338: Fix broken cache invalidation with deallocated and reallocated document node

From: Date: Sun, 01 Oct 2023 13:21:23 +0000
Subject: [php-src] PR #12338: Fix broken cache invalidation with deallocated and reallocated document node
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-23759@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/12338 Author: nielsdos The original caching implementation had an oversight in combination with the new lifetime management in DOM for 8.3. The modification counter is stored on the document object itself, but as that can get deallocated when all references disappear, stale cache data can be used. Normally this isn't a problem, unless getElementsByTagName is called not on the document but on a child node. Fix it by moving caching data into the ref object, which will outlive all nodes from a document even if the document object disappears.

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