mirror of
https://github.com/php/php-src.git
synced 2024-11-29 04:46:07 +08:00
- Fix bug in XML extension which exists due to a not perfect work around
- with ZE1. In ZE2 the correct code seems to work well.
This commit is contained in:
parent
8a0c756c58
commit
66d88ba07b
@ -289,11 +289,12 @@ static void xml_parser_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC)
|
||||
{
|
||||
xml_parser *parser = (xml_parser *)rsrc->ptr;
|
||||
|
||||
/* please leave this commented - or ask thies@thieso.net before doing it (again)
|
||||
/* please leave this commented - or ask thies@thieso.net before doing it (again) */
|
||||
#ifdef ZEND_ENGINE_2
|
||||
if (parser->object) {
|
||||
zval_ptr_dtor(&parser->object);
|
||||
}
|
||||
*/
|
||||
#endif
|
||||
|
||||
if (parser->parser) {
|
||||
XML_ParserFree(parser->parser);
|
||||
@ -1126,17 +1127,19 @@ PHP_FUNCTION(xml_set_object)
|
||||
|
||||
ZEND_FETCH_RESOURCE(parser,xml_parser *,pind, -1, "XML Parser", le_xml_parser);
|
||||
|
||||
/* please leave this commented - or ask thies@thieso.net before doing it (again)
|
||||
/* please leave this commented - or ask thies@thieso.net before doing it (again) */
|
||||
#ifdef ZEND_ENGINE_2
|
||||
if (parser->object) {
|
||||
zval_ptr_dtor(&parser->object);
|
||||
}
|
||||
*/
|
||||
#endif
|
||||
|
||||
parser->object = *mythis;
|
||||
|
||||
/* please leave this commented - or ask thies@thieso.net before doing it (again)
|
||||
/* please leave this commented - or ask thies@thieso.net before doing it (again) */
|
||||
#ifdef ZEND_ENGINE_2
|
||||
zval_add_ref(&parser->object);
|
||||
*/
|
||||
#endif
|
||||
|
||||
RETVAL_TRUE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user