File php-5.1.2-phpbug-36006.patch of Package php

--- Zend/zend_objects_API.c
+++ Zend/zend_objects_API.c
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_objects_API.c,v 1.47.2.4 2006/01/04 23:53:04 andi Exp $ */
+/* $Id: zend_objects_API.c,v 1.47.2.5 2006/01/16 10:12:36 dmitry Exp $ */
 
 #include "zend.h"
 #include "zend_globals.h"
@@ -52,7 +52,9 @@
 			if (!objects->object_buckets[i].destructor_called) {
 				objects->object_buckets[i].destructor_called = 1;
 				if (obj->dtor && obj->object) {
+					obj->refcount++;
 					obj->dtor(obj->object, i TSRMLS_CC);
+					obj->refcount--;
 				}
 			}
 		}
openSUSE Build Service is sponsored by