php.net |  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
Description:
------------
Trying to unregister already unregistered nodeclass throws E_FATAL..

Unregistering nodeclass before any nodeclass is registered works fine however.

Reproduce code:
---------------
<?php
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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-10-29 21:27 UTC] rrichards@php.net
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
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 07:01:29 2024 UTC