From: Christian Stocker Date: Mon, 29 Jul 2002 14:04:44 +0000 (+0000) Subject: - nodename is not always set, check if it really is. X-Git-Tag: dev~109 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=825b5a42e2a70022e668848230f590ba4b89be63;p=php - nodename is not always set, check if it really is. - make force_ref for aliases as well --- 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);