Bug #52782: DOMDocument subclass forgotten using ->ownerDocument after closure
| From: | Jan Moesen | Date: | Tue, 05 Oct 2010 07:43:25 +0000 |
| Subject: | Bug #52782: DOMDocument subclass forgotten using ->ownerDocument after closure | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-308452@lists.php.net to get a copy of this message | ||
(I filed bug #52782 about a month ago, but have not received any reply. I am posting here to try and get some feedback on it.)
We have custom XML document and element classes that extend the original DOMDocument and DOMElement classes for convenience. There is a class that uses an instance of XmlElement obtained via a callback specified at construction time. That XmlElement works fine and stays that way. However, when we get its ownerDocument outside of the closure, the result is not an XmlDocument but a DOMDocument. I cannot see a single reason why.
I tried several options, and it only seems to happen with that closure. I have checked versions 5.3.1, 5.3.2, 5.3.3 and now the latest 5.3.4 snapshot compiled with './configure && make'.
More details and a test case: http://bugs.php.net/bug.php?id=52782
Jan