felipe          Sun Oct 26 13:25:06 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/standard       streamsfuncs.c 
  Log:
  - MFH: 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.58.2.6.2.15.2.23&r2=1.58.2.6.2.15.2.24&diff_format=u
Index: php-src/ext/standard/streamsfuncs.c
diff -u php-src/ext/standard/streamsfuncs.c:1.58.2.6.2.15.2.23 
php-src/ext/standard/streamsfuncs.c:1.58.2.6.2.15.2.24
--- php-src/ext/standard/streamsfuncs.c:1.58.2.6.2.15.2.23      Tue Oct 21 
22:08:37 2008
+++ php-src/ext/standard/streamsfuncs.c Sun Oct 26 13:25:06 2008
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: streamsfuncs.c,v 1.58.2.6.2.15.2.23 2008/10/21 22:08:37 lbarnaud Exp $ 
*/
+/* $Id: streamsfuncs.c,v 1.58.2.6.2.15.2.24 2008/10/26 13:25:06 felipe Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -829,12 +829,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_STRING(ps[2], xmsg, 0);
+               ZVAL_STRING(ps[2], xmsg, 1);
        } else {
                ZVAL_NULL(ps[2]);
        }
@@ -845,6 +846,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

Reply via email to