diff options
author | Rob Richards <rrichards@php.net> | 2004-05-16 10:30:16 +0000 |
---|---|---|
committer | Rob Richards <rrichards@php.net> | 2004-05-16 10:30:16 +0000 |
commit | 9e3956b313ef74f0e7c4881ca39c9395036d45bb (patch) | |
tree | f14ce42a575f226ac068b10f216df59c04c32896 /ext/dom/xpath.c | |
parent | 92c72cb8d85d9115c08f857f2237bd532848a786 (diff) | |
download | php-git-9e3956b313ef74f0e7c4881ca39c9395036d45bb.tar.gz |
constructors throw DOMException
add DOM_PHP_ERR DomException code
validate tagnames in constructors
use C style comments
update TODO
Diffstat (limited to 'ext/dom/xpath.c')
-rw-r--r-- | ext/dom/xpath.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/dom/xpath.c b/ext/dom/xpath.c index e4e22c0a41..9f0f59cc0d 100644 --- a/ext/dom/xpath.c +++ b/ext/dom/xpath.c @@ -49,14 +49,18 @@ PHP_METHOD(domxpath, __construct) dom_object *docobj, *intern; xmlXPathContextPtr ctx, oldctx; + php_set_error_handling(EH_THROW, dom_domexception_class_entry TSRMLS_CC); if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &id, dom_xpath_class_entry, &doc, dom_document_class_entry) == FAILURE) { + php_std_error_handling(); return; } + php_std_error_handling(); DOM_GET_OBJ(docp, doc, xmlDocPtr, docobj); ctx = xmlXPathNewContext(docp); if (ctx == NULL) { + php_dom_throw_error(INVALID_STATE_ERR, 1 TSRMLS_CC); RETURN_FALSE; } |