diff options
| author | Rob Richards <rrichards@php.net> | 2003-08-24 10:24:22 +0000 |
|---|---|---|
| committer | Rob Richards <rrichards@php.net> | 2003-08-24 10:24:22 +0000 |
| commit | b196c0551ed9ef4bbe598b818da90f2d4c45acbd (patch) | |
| tree | 01c512369dff436b6b197bfb18658dff015c3759 /ext/dom | |
| parent | 09481c642b59737096d25518a290d8a3bb710042 (diff) | |
| download | php-git-b196c0551ed9ef4bbe598b818da90f2d4c45acbd.tar.gz | |
implement stricterrorcheck
fix clonenode
cleanup error routines
forgot these files
Diffstat (limited to 'ext/dom')
| -rw-r--r-- | ext/dom/php_dom.h | 3 | ||||
| -rw-r--r-- | ext/dom/xml_common.h | 5 | ||||
| -rw-r--r-- | ext/dom/xpath.c | 4 |
3 files changed, 7 insertions, 5 deletions
diff --git a/ext/dom/php_dom.h b/ext/dom/php_dom.h index 6bdf13952f..c162de4e3c 100644 --- a/ext/dom/php_dom.h +++ b/ext/dom/php_dom.h @@ -71,7 +71,8 @@ zend_object_value dom_objects_new(zend_class_entry *class_type TSRMLS_DC); #if defined(LIBXML_XPATH_ENABLED) zend_object_value dom_xpath_objects_new(zend_class_entry *class_type TSRMLS_DC); #endif -void php_dom_throw_error(int error_code, zval **retval TSRMLS_DC); +int dom_get_strict_error(dom_ref_obj *document); +void php_dom_throw_error(int error_code, int strict_error TSRMLS_DC); void node_free_resource(xmlNodePtr node TSRMLS_DC); void node_list_unlink(xmlNodePtr node TSRMLS_DC); int decrement_node_ptr(dom_object *object TSRMLS_DC); diff --git a/ext/dom/xml_common.h b/ext/dom/xml_common.h index 629538232b..f309da5d96 100644 --- a/ext/dom/xml_common.h +++ b/ext/dom/xml_common.h @@ -25,6 +25,7 @@ typedef struct _dom_ref_obj { void *ptr; int refcount; + int stricterror; } dom_ref_obj; typedef struct _node_ptr { @@ -87,13 +88,13 @@ PHP_DOM_EXPORT(void) dom_write_property(zval *object, zval *member, zval *value #define DOM_RET_OBJ(zval, obj, ret, domobject) \ if (NULL == (zval = php_dom_create_object(obj, ret, zval, return_value, domobject TSRMLS_CC))) { \ - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot create required DOM object"); \ + php_error(E_WARNING, "Cannot create required DOM object"); \ RETURN_FALSE; \ } #define DOM_GET_THIS(zval) \ if (NULL == (zval = getThis())) { \ - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Underlying object missing"); \ + php_error(E_WARNING, "Underlying object missing"); \ RETURN_FALSE; \ } diff --git a/ext/dom/xpath.c b/ext/dom/xpath.c index 21427211d4..73092bba99 100644 --- a/ext/dom/xpath.c +++ b/ext/dom/xpath.c @@ -92,7 +92,7 @@ int dom_xpath_document_read(dom_object *obj, zval **retval TSRMLS_DC) ALLOC_ZVAL(*retval); if (NULL == (*retval = php_dom_create_object((xmlNodePtr) docp, &ret, NULL, *retval, obj TSRMLS_CC))) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot create required DOM object"); + php_error(E_WARNING, "Cannot create required DOM object"); return FAILURE; } return SUCCESS; @@ -115,7 +115,7 @@ PHP_FUNCTION(dom_xpath_query) ctxp = (xmlXPathContextPtr) intern->ptr; if (ctxp == NULL) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid XPath Context"); + php_error(E_WARNING, "Invalid XPath Context"); RETURN_FALSE; } |
