summaryrefslogtreecommitdiff
path: root/ext/domxml/php_domxml.c
diff options
context:
space:
mode:
authorChristian Stocker <chregu@php.net>2002-07-29 14:04:44 +0000
committerChristian Stocker <chregu@php.net>2002-07-29 14:04:44 +0000
commit825b5a42e2a70022e668848230f590ba4b89be63 (patch)
tree829af4b7a7567e62ba2ed08be073d65e31e05568 /ext/domxml/php_domxml.c
parent1463c0b7eef2307148fd3da57b00260e315607fd (diff)
downloadphp-git-825b5a42e2a70022e668848230f590ba4b89be63.tar.gz
- nodename is not always set, check if it really is.
- make force_ref for aliases as well
Diffstat (limited to 'ext/domxml/php_domxml.c')
-rw-r--r--ext/domxml/php_domxml.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/domxml/php_domxml.c b/ext/domxml/php_domxml.c
index 3736f07bb3..d18a996ca3 100644
--- a/ext/domxml/php_domxml.c
+++ b/ext/domxml/php_domxml.c
@@ -203,9 +203,9 @@ static unsigned char third_args_force_ref[] = { 3, BYREF_NONE, BYREF_NONE, BYRE
static zend_function_entry domxml_functions[] = {
PHP_FE(domxml_version, NULL)
PHP_FE(xmldoc, third_args_force_ref)
- PHP_FALIAS(domxml_open_mem, xmldoc, NULL)
+ PHP_FALIAS(domxml_open_mem, xmldoc, third_args_force_ref)
PHP_FE(xmldocfile, third_args_force_ref)
- PHP_FALIAS(domxml_open_file, xmldocfile, NULL)
+ PHP_FALIAS(domxml_open_file, xmldocfile, third_args_force_ref)
#if defined(LIBXML_HTML_ENABLED)
PHP_FE(html_doc, NULL)
PHP_FE(html_doc_file, NULL)
@@ -1418,7 +1418,9 @@ static void domxml_error_validate(void *ctx, const char *msg, ...)
// do error handling here
}
if (ctxt->parser != NULL) {
- add_assoc_string(errormessages,"nodename",ctxt->parser->name,1);
+ if (ctxt->parser->name) {
+ add_assoc_string(errormessages,"nodename",ctxt->parser->name,1);
+ }
if (ctxt->parser->input != NULL) {
add_assoc_long(errormessages,"line",ctxt->parser->input->line);