diff options
author | Rob Richards <rrichards@php.net> | 2006-03-03 20:15:10 +0000 |
---|---|---|
committer | Rob Richards <rrichards@php.net> | 2006-03-03 20:15:10 +0000 |
commit | 65211cddcc0fecbf7b0321cb250f5b7538428cf2 (patch) | |
tree | bdeec77d7bc555f94f627f40c0c442f93355b4b6 /ext/dom/notation.c | |
parent | a1024ce67972714079bc591444a59870c780e350 (diff) | |
download | php-git-65211cddcc0fecbf7b0321cb250f5b7538428cf2.tar.gz |
fix crashes using notations and entity decls
add test
Diffstat (limited to 'ext/dom/notation.c')
-rw-r--r-- | ext/dom/notation.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/dom/notation.c b/ext/dom/notation.c index 2a085e7639..ed1e73c032 100644 --- a/ext/dom/notation.c +++ b/ext/dom/notation.c @@ -48,9 +48,9 @@ Since: */ int dom_notation_public_id_read(dom_object *obj, zval **retval TSRMLS_DC) { - xmlNotationPtr nodep; + xmlEntityPtr nodep; - nodep = (xmlNotationPtr) dom_object_get_node(obj); + nodep = (xmlEntityPtr) dom_object_get_node(obj); if (nodep == NULL) { php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC); @@ -58,8 +58,8 @@ int dom_notation_public_id_read(dom_object *obj, zval **retval TSRMLS_DC) } ALLOC_ZVAL(*retval); - if (nodep->PublicID) { - ZVAL_STRING(*retval, (char *) (nodep->PublicID), 1); + if (nodep->ExternalID) { + ZVAL_STRING(*retval, (char *) (nodep->ExternalID), 1); } else { ZVAL_EMPTY_STRING(*retval); } @@ -78,9 +78,9 @@ Since: */ int dom_notation_system_id_read(dom_object *obj, zval **retval TSRMLS_DC) { - xmlNotationPtr nodep; + xmlEntityPtr nodep; - nodep = (xmlNotationPtr) dom_object_get_node(obj); + nodep = (xmlEntityPtr) dom_object_get_node(obj); if (nodep == NULL) { php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC); @@ -89,7 +89,7 @@ int dom_notation_system_id_read(dom_object *obj, zval **retval TSRMLS_DC) ALLOC_ZVAL(*retval); if (nodep->SystemID) { - ZVAL_STRING(*retval, (char *) (nodep->PublicID), 1); + ZVAL_STRING(*retval, (char *) (nodep->SystemID), 1); } else { ZVAL_EMPTY_STRING(*retval); } |