|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46406 Unregistering nodeclass throws E_FATAL
Submitted: 2008-10-28 13:16 UTC Modified: 2008-10-29 21:27 UTC
From: hannes dot magnusson at gmail dot com Assigned:
Status: Closed Package: DOM XML related
PHP Version: 5.2.7RC2 OS: Irrelevant
Private report: No CVE-ID: None
 [2008-10-28 13:16 UTC] hannes dot magnusson at gmail dot com
Trying to unregister already unregistered nodeclass throws E_FATAL..

Unregistering nodeclass before any nodeclass is registered works fine however.

Reproduce code:
class elm extends DOMNode {}

$dom = new DOMDocument;
// Unregistering nothing, works fine
$dom->registerNodeClass("DOMNode", null);

$dom->registerNodeClass("DOMNode", "elm");
// Unregister "elm", works fine
$dom->registerNodeClass("DOMNode", null);

// Unregistering nothing, E_FATAL
$dom->registerNodeClass("DOMNode", null);

Expected result:
Nothing to happen.

Actual result:
Fatal error: DOMDocument::registerNodeClass(): Class (null) could not be registered. in /crypto/bjori/- on line 13


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-10-29 21:27 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Feb 28 00:01:32 2024 UTC