Bug #54967 [Opn]: missing error constants in DOMException

From: Date: Wed, 01 Jun 2011 05:17:56 +0000
Subject: Bug #54967 [Opn]: missing error constants in DOMException
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-161079@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=54967&edit=1

 ID:                 54967
 Updated by:         dtajchreber@php.net
 Reported by:        giorgio dot liscio at email dot it
 Summary:            missing error constants in DOMException
 Status:             Open
 Type:               Bug
 Package:            DOM XML related
 Operating System:   Irrelevant
 PHP Version:        5.3.6
 Block user comment: N
 Private report:     N

 New Comment:

Not sure what you're saying is wrong... but they're defined as global
constants:

http://lxr.php.net/opengrok/xref/PHP_5_4/ext/dom/dom_fe.h#56
http://lxr.php.net/opengrok/xref/PHP_5_4/ext/dom/php_dom.c#859

[david@oslo:~]$ php -v
PHP 5.3.7-dev (cli) (built: May 15 2011 18:57:11) (DEBUG)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
[david@oslo:~]$ php -r 'print_r(get_defined_constants());' | grep -i
'.*\[dom'
    [DOM_PHP_ERR] => 0
    [DOM_INDEX_SIZE_ERR] => 1
    [DOMSTRING_SIZE_ERR] => 2
    [DOM_HIERARCHY_REQUEST_ERR] => 3
    [DOM_WRONG_DOCUMENT_ERR] => 4
    [DOM_INVALID_CHARACTER_ERR] => 5
    [DOM_NO_DATA_ALLOWED_ERR] => 6
    [DOM_NO_MODIFICATION_ALLOWED_ERR] => 7
    [DOM_NOT_FOUND_ERR] => 8
    [DOM_NOT_SUPPORTED_ERR] => 9
    [DOM_INUSE_ATTRIBUTE_ERR] => 10
    [DOM_INVALID_STATE_ERR] => 11
    [DOM_SYNTAX_ERR] => 12
    [DOM_INVALID_MODIFICATION_ERR] => 13
    [DOM_NAMESPACE_ERR] => 14
    [DOM_INVALID_ACCESS_ERR] => 15
    [DOM_VALIDATION_ERR] => 16
[david@oslo:~]$


Previous Comments:
------------------------------------------------------------------------
[2011-05-31 23:21:58] giorgio dot liscio at email dot it

Description:
------------
hi, 
the exception constants are not defined in DOMException class

here are the dom2 constants:
const unsigned short      INDEX_SIZE_ERR                 = 1;
const unsigned short      DOMSTRING_SIZE_ERR             = 2;
const unsigned short      HIERARCHY_REQUEST_ERR          = 3;
const unsigned short      WRONG_DOCUMENT_ERR             = 4;
const unsigned short      INVALID_CHARACTER_ERR          = 5;
const unsigned short      NO_DATA_ALLOWED_ERR            = 6;
const unsigned short      NO_MODIFICATION_ALLOWED_ERR    = 7;
const unsigned short      NOT_FOUND_ERR                  = 8;
const unsigned short      NOT_SUPPORTED_ERR              = 9;
const unsigned short      INUSE_ATTRIBUTE_ERR            = 10;
const unsigned short      INVALID_STATE_ERR              = 11;
const unsigned short      SYNTAX_ERR                     = 12;
const unsigned short      INVALID_MODIFICATION_ERR       = 13;
const unsigned short      NAMESPACE_ERR                  = 14;
const unsigned short      INVALID_ACCESS_ERR             = 15;





------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=54967&edit=1


Thread (4 messages)

« previous php.bugs (#161079) next »