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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: hannes dot magnusson at gmail dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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: Thu Nov 21 12:01:29 2024 UTC