summaryrefslogtreecommitdiff
path: root/ext/dom/text.c
diff options
context:
space:
mode:
authorRob Richards <rrichards@php.net>2004-05-16 10:30:16 +0000
committerRob Richards <rrichards@php.net>2004-05-16 10:30:16 +0000
commit9e3956b313ef74f0e7c4881ca39c9395036d45bb (patch)
treef14ce42a575f226ac068b10f216df59c04c32896 /ext/dom/text.c
parent92c72cb8d85d9115c08f857f2237bd532848a786 (diff)
downloadphp-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/text.c')
-rw-r--r--ext/dom/text.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/dom/text.c b/ext/dom/text.c
index 78fd7feafe..e3c4f05a3c 100644
--- a/ext/dom/text.c
+++ b/ext/dom/text.c
@@ -53,14 +53,19 @@ PHP_METHOD(domtext, __construct)
char *value = NULL;
int value_len;
+ php_set_error_handling(EH_THROW, dom_domexception_class_entry TSRMLS_CC);
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|s", &id, dom_text_class_entry, &value, &value_len) == FAILURE) {
+ php_std_error_handling();
return;
}
+ php_std_error_handling();
nodep = xmlNewText((xmlChar *) value);
- if (!nodep)
+ if (!nodep) {
+ php_dom_throw_error(INVALID_STATE_ERR, 1 TSRMLS_CC);
RETURN_FALSE;
+ }
intern = (dom_object *)zend_object_store_get_object(id TSRMLS_CC);
if (intern != NULL) {