diff options
Diffstat (limited to 'ext/dom/processinginstruction.c')
-rw-r--r-- | ext/dom/processinginstruction.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/ext/dom/processinginstruction.c b/ext/dom/processinginstruction.c index 7b18096fab..38b934d011 100644 --- a/ext/dom/processinginstruction.c +++ b/ext/dom/processinginstruction.c @@ -50,22 +50,17 @@ const zend_function_entry php_dom_processinginstruction_class_functions[] = { /* {{{ proto void DOMProcessingInstruction::__construct(string name, [string value]); */ PHP_METHOD(domprocessinginstruction, __construct) { - zval *id; + zval *id = getThis(); xmlNodePtr nodep = NULL, oldnode = NULL; dom_object *intern; char *name, *value = NULL; size_t name_len, value_len; int name_valid; - zend_error_handling error_handling; - zend_replace_error_handling(EH_THROW, dom_domexception_class_entry, &error_handling); - if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Os|s", &id, dom_processinginstruction_class_entry, &name, &name_len, &value, &value_len) == FAILURE) { - zend_restore_error_handling(&error_handling); + if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "s|s", &name, &name_len, &value, &value_len) == FAILURE) { return; } - zend_restore_error_handling(&error_handling); - name_valid = xmlValidateName((xmlChar *) name, 0); if (name_valid != 0) { php_dom_throw_error(INVALID_CHARACTER_ERR, 1); |