[php-src] PR #18749: Fix GH-18744: PHP 8.4 classList works not correctly if copy HTMLElement by clone keyword.
| From: | nielsdos | Date: | Tue, 03 Jun 2025 17:21:38 +0000 |
| Subject: | [php-src] PR #18749: Fix GH-18744: PHP 8.4 classList works not correctly if copy HTMLElement by clone keyword. | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-31936@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/18749
Author: nielsdos
The $classList property is special in the sense that it's a cached object instance per
(HTML)Element instance. The reason for this design is because it has the [[SameObject]] IDL
attribute. Cloning in PHP also clones the properties, so it also clones the cached instance. To
solve this, we undo this by resetting the backing storage.