From cb38be1bd2a1f05639418202bbe2beaf3cd6c832 Mon Sep 17 00:00:00 2001 From: Moriyoshi Koizumi Date: Thu, 3 Apr 2003 01:00:45 +0000 Subject: [PATCH] Fixed segfault in xml_parser_create() # due to too many %s in printf spec --- ext/xml/xml.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/xml/xml.c b/ext/xml/xml.c index caacb036e0..64eaad3b77 100644 --- a/ext/xml/xml.c +++ b/ext/xml/xml.c @@ -1027,7 +1027,7 @@ PHP_FUNCTION(xml_parser_create) Z_STRLEN_PP(encodingArg)) == 0) { encoding = "US-ASCII"; } else { /* UTF-16 not supported */ - php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s: unsupported source encoding \"%s\"", Z_STRVAL_PP(encodingArg)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "unsupported source encoding \"%s\"", Z_STRVAL_PP(encodingArg)); RETURN_FALSE; } } else { @@ -1076,7 +1076,7 @@ PHP_FUNCTION(xml_parser_create_ns) Z_STRLEN_PP(encodingArg)) == 0) { encoding = "US-ASCII"; } else { /* UTF-16 not supported */ - php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s: unsupported source encoding \"%s\"", Z_STRVAL_PP(encodingArg)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "unsupported source encoding \"%s\"", Z_STRVAL_PP(encodingArg)); RETURN_FALSE; } } else { @@ -1131,9 +1131,9 @@ PHP_FUNCTION(xml_set_object) parser->object = *mythis; /* please leave this commented - or ask thies@thieso.net before doing it (again) */ -#ifdef ZEND_ENGINE_2 +/* #ifdef ZEND_ENGINE_2 zval_add_ref(&parser->object); -#endif +#endif */ RETVAL_TRUE; } -- 2.50.1