thies           Thu Feb 15 05:41:05 2001 EDT

  Modified files:              
    /php4/ext/xml       xml.c 
  Log:
  fixed SEGFAULT when using xml_set_object. Zend does not yes support 
  cyclic references!
  
  
Index: php4/ext/xml/xml.c
diff -u php4/ext/xml/xml.c:1.71 php4/ext/xml/xml.c:1.72
--- php4/ext/xml/xml.c:1.71     Fri Jan  5 10:09:43 2001
+++ php4/ext/xml/xml.c  Thu Feb 15 05:41:04 2001
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: xml.c,v 1.71 2001/01/05 18:09:43 dbeu Exp $ */
+/* $Id: xml.c,v 1.72 2001/02/15 13:41:04 thies Exp $ */
 #define IS_EXT_MODULE
 
 #include "php.h"
@@ -294,9 +294,11 @@
 {
        xml_parser *parser = (xml_parser *)rsrc->ptr;
 
-       if (parser->object) {
+       /* please leave this commented - or ask [EMAIL PROTECTED] before doing it 
+(again) 
+    if (parser->object) {
                zval_del_ref(&parser->object);
        }
+       */
        
        if (parser->parser) {
                XML_ParserFree(parser->parser);
@@ -1175,19 +1177,19 @@
                RETURN_FALSE;
        }
 
-       if (! ParameterPassedByReference(ht,2)) {
-               php_error(E_WARNING,"arg 2 not passed by reference");
-               RETURN_FALSE;
-       }
-
        ZEND_FETCH_RESOURCE(parser,xml_parser *,pind, -1, "XML Parser", le_xml_parser);
 
-       if (parser->object) {
+       /* please leave this commented - or ask [EMAIL PROTECTED] before doing it 
+(again) 
+    if (parser->object) {
                zval_del_ref(&parser->object);
        }
+       */
        
        parser->object = *mythis;
-       zval_add_ref(&parser->object);
+
+       /* please leave this commented - or ask [EMAIL PROTECTED] before doing it 
+(again) 
+       zval_add_ref(&parser->object); 
+       */
 
        RETVAL_TRUE;
 }
@@ -1405,19 +1407,10 @@
 
        argc = ZEND_NUM_ARGS();
        if (zend_get_parameters_ex(4, &pind, &data, &xdata,&info) == SUCCESS) {
-               if (!ParameterPassedByReference(ht, 4)) {
-                       php_error(E_WARNING, "Array to be filled with values must be 
passed by reference.");
-            RETURN_FALSE;
-               }
                zval_dtor(*info);
                array_init(*info);
        } else if (zend_get_parameters_ex(3, &pind, &data, &xdata) == FAILURE) {
                WRONG_PARAM_COUNT;
-       }
-
-       if (!ParameterPassedByReference(ht, 3)) {
-               php_error(E_WARNING, "Array to be filled with values must be passed by 
reference.");
-               RETURN_FALSE;
        }
 
        ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, "XML Parser", 
le_xml_parser);



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to