diff --git a/ext/dom/domexception.c b/ext/dom/domexception.c index 09532562d1712..b9771fb03852d 100644 --- a/ext/dom/domexception.c +++ b/ext/dom/domexception.c @@ -30,7 +30,7 @@ * Since: */ -void php_dom_throw_error_with_message(int error_code, char *error_message, bool strict_error) /* {{{ */ +void php_dom_throw_error_with_message(dom_exception_code error_code, const char *error_message, bool strict_error) /* {{{ */ { if (strict_error) { zend_throw_exception(dom_domexception_class_entry, error_message, error_code); @@ -41,9 +41,9 @@ void php_dom_throw_error_with_message(int error_code, char *error_message, bool /* }}} */ /* {{{ php_dom_throw_error */ -void php_dom_throw_error(int error_code, bool strict_error) +void php_dom_throw_error(dom_exception_code error_code, bool strict_error) { - char *error_message; + const char *error_message; switch (error_code) { diff --git a/ext/dom/php_dom.h b/ext/dom/php_dom.h index 891c771d7931c..27c603a3d9d40 100644 --- a/ext/dom/php_dom.h +++ b/ext/dom/php_dom.h @@ -130,8 +130,8 @@ zend_object *dom_nnodemap_objects_new(zend_class_entry *class_type); zend_object *dom_xpath_objects_new(zend_class_entry *class_type); #endif bool dom_get_strict_error(php_libxml_ref_obj *document); -void php_dom_throw_error(int error_code, bool strict_error); -void php_dom_throw_error_with_message(int error_code, char *error_message, bool strict_error); +void php_dom_throw_error(dom_exception_code error_code, bool strict_error); +void php_dom_throw_error_with_message(dom_exception_code error_code, const char *error_message, bool strict_error); void node_list_unlink(xmlNodePtr node); int dom_check_qname(char *qname, char **localname, char **prefix, int uri_len, int name_len); xmlNsPtr dom_get_ns(xmlNodePtr node, char *uri, int *errorcode, char *prefix);