From: Moriyoshi Koizumi Date: Thu, 3 Apr 2003 01:01:09 +0000 (+0000) Subject: MFH(r-1.117): fixed segfault in xml_parser_create() X-Git-Tag: php-4.3.2RC2~182 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=55c5c4b3626098a117b549c47a5b6f95d9a1c586;p=php MFH(r-1.117): fixed segfault in xml_parser_create() --- diff --git a/ext/xml/xml.c b/ext/xml/xml.c index b40bc1743f..38f5cf0d68 100644 --- a/ext/xml/xml.c +++ b/ext/xml/xml.c @@ -1032,7 +1032,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 { @@ -1081,7 +1081,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 { @@ -1136,9 +1136,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; }