felipe Sun Oct 26 13:22:00 2008 UTC
Modified files:
/php-src/ext/standard streamsfuncs.c
Log:
- Fixed bug #46388 (stream_notification_callback inside of object destroys
object variables)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/streamsfuncs.c?r1=1.124&r2=1.125&diff_format=u
Index: php-src/ext/standard/streamsfuncs.c
diff -u php-src/ext/standard/streamsfuncs.c:1.124
php-src/ext/standard/streamsfuncs.c:1.125
--- php-src/ext/standard/streamsfuncs.c:1.124 Tue Oct 21 22:06:48 2008
+++ php-src/ext/standard/streamsfuncs.c Sun Oct 26 13:22:00 2008
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: streamsfuncs.c,v 1.124 2008/10/21 22:06:48 lbarnaud Exp $ */
+/* $Id: streamsfuncs.c,v 1.125 2008/10/26 13:22:00 felipe Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -871,12 +871,13 @@
INIT_ZVAL(zvs[i]);
ps[i] = &zvs[i];
ptps[i] = &ps[i];
+ MAKE_STD_ZVAL(ps[i]);
}
ZVAL_LONG(ps[0], notifycode);
ZVAL_LONG(ps[1], severity);
if (xmsg) {
- ZVAL_RT_STRING(ps[2], xmsg, ZSTR_AUTOFREE);
+ ZVAL_RT_STRING(ps[2], xmsg, ZSTR_DUPLICATE);
} else {
ZVAL_NULL(ps[2]);
}
@@ -887,6 +888,9 @@
if (FAILURE == call_user_function_ex(EG(function_table), NULL,
callback, &retval, 6, ptps, 0, NULL TSRMLS_CC)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "failed to call
user notifier");
}
+ for (i = 0; i < 6; i++) {
+ zval_ptr_dtor(&ps[i]);
+ }
if (retval) {
zval_ptr_dtor(&retval);
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php