From: Xinchen Hui Date: Wed, 4 Apr 2012 09:36:18 +0000 (+0800) Subject: Merge branch 'PHP-5.3' into PHP-5.4 X-Git-Tag: php-5.4.4RC1~154 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1ff80215190e0746d89c5502c232e26c6fabe5d4;p=php Merge branch 'PHP-5.3' into PHP-5.4 * PHP-5.3: Fixed bug #61617 (Libxml tests failed(ht is already destroyed)) Cherry-pick 4cc74767 Conflicts: NEWS --- 1ff80215190e0746d89c5502c232e26c6fabe5d4 diff --cc ext/libxml/libxml.c index 9d6c25737d,a17847868a..e42d845f90 --- a/ext/libxml/libxml.c +++ b/ext/libxml/libxml.c @@@ -865,16 -659,15 +865,17 @@@ static int php_libxml_post_deactivate( { TSRMLS_FETCH(); /* reset libxml generic error handling */ - xmlSetGenericErrorFunc(NULL, NULL); - xmlSetStructuredErrorFunc(NULL, NULL); + if (_php_libxml_per_request_initialization) { + xmlSetGenericErrorFunc(NULL, NULL); + xmlSetStructuredErrorFunc(NULL, NULL); - xmlParserInputBufferCreateFilenameDefault(NULL); - xmlOutputBufferCreateFilenameDefault(NULL); + xmlParserInputBufferCreateFilenameDefault(NULL); + xmlOutputBufferCreateFilenameDefault(NULL); + } if (LIBXML(stream_context)) { - zval_ptr_dtor(&LIBXML(stream_context)); + /* the steam_context resource will be released by resource list destructor */ + efree(LIBXML(stream_context)); LIBXML(stream_context) = NULL; } smart_str_free(&LIBXML(error_buffer));