diff options
-rw-r--r-- | ext/libxml/libxml.c | 11 | ||||
-rw-r--r-- | ext/libxml/tests/libxml_set_external_entity_loader_basic.phpt | 1 |
2 files changed, 9 insertions, 3 deletions
diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c index d399f72b95..af87213a39 100644 --- a/ext/libxml/libxml.c +++ b/ext/libxml/libxml.c @@ -86,6 +86,7 @@ ZEND_GET_MODULE(libxml) /* {{{ function prototypes */ static PHP_MINIT_FUNCTION(libxml); static PHP_RINIT_FUNCTION(libxml); +static PHP_RSHUTDOWN_FUNCTION(libxml); static PHP_MSHUTDOWN_FUNCTION(libxml); static PHP_MINFO_FUNCTION(libxml); static int php_libxml_post_deactivate(); @@ -138,7 +139,7 @@ zend_module_entry libxml_module_entry = { PHP_MINIT(libxml), /* extension-wide startup function */ PHP_MSHUTDOWN(libxml), /* extension-wide shutdown function */ PHP_RINIT(libxml), /* per-request startup function */ - NULL, /* per-request shutdown function */ + PHP_RSHUTDOWN(libxml), /* per-request shutdown function */ PHP_MINFO(libxml), /* information function */ NO_VERSION_YET, PHP_MODULE_GLOBALS(libxml), /* globals descriptor */ @@ -862,6 +863,12 @@ static PHP_RINIT_FUNCTION(libxml) return SUCCESS; } +static PHP_RSHUTDOWN_FUNCTION(libxml) +{ + _php_libxml_destroy_fci(&LIBXML(entity_loader).fci, &LIBXML(entity_loader).object); + + return SUCCESS; +} static PHP_MSHUTDOWN_FUNCTION(libxml) { @@ -898,8 +905,6 @@ static int php_libxml_post_deactivate() } xmlResetLastError(); - _php_libxml_destroy_fci(&LIBXML(entity_loader).fci, &LIBXML(entity_loader).object); - return SUCCESS; } diff --git a/ext/libxml/tests/libxml_set_external_entity_loader_basic.phpt b/ext/libxml/tests/libxml_set_external_entity_loader_basic.phpt index 51ab777052..938229ff86 100644 --- a/ext/libxml/tests/libxml_set_external_entity_loader_basic.phpt +++ b/ext/libxml/tests/libxml_set_external_entity_loader_basic.phpt @@ -31,6 +31,7 @@ var_dump($dd->validate()); echo "Done.\n"; +?> --EXPECT-- string(10) "-//FOO/BAR" string(25) "http://example.com/foobar" |