sterling                Thu Jun  5 13:48:51 2003 EDT

  Modified files:              
    /php4/ext/xml       xml.c 
  Log:
  prevent double destroy and double init badness
  
  
Index: php4/ext/xml/xml.c
diff -u php4/ext/xml/xml.c:1.128 php4/ext/xml/xml.c:1.129
--- php4/ext/xml/xml.c:1.128    Mon May 26 20:50:00 2003
+++ php4/ext/xml/xml.c  Thu Jun  5 13:48:51 2003
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: xml.c,v 1.128 2003/05/27 00:50:00 iliaa Exp $ */
+/* $Id: xml.c,v 1.129 2003/06/05 17:48:51 sterling Exp $ */
 
 #define IS_EXT_MODULE
 
@@ -35,6 +35,8 @@
 
 #if HAVE_XML
 
+int xml_parser_inited = 0;
+
 #include "php_xml.h"
 # include "ext/standard/head.h"
 
@@ -250,7 +252,10 @@
 PHP_RSHUTDOWN_FUNCTION(xml)
 {
 #ifdef LIBXML_EXPAT_COMPAT
-       xmlCleanupParser();
+       if (xml_parser_inited) {
+               xmlCleanupParser();
+               xml_parser_inited = 0;
+       }
 #endif 
        return SUCCESS;
 }



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to