com php-src: Fixed retval for ps_call_handler: ext/sess ion/mod_user.c

From: Date: Sat, 29 Mar 2014 12:17:59 +0000
Subject: com php-src: Fixed retval for ps_call_handler: ext/sess ion/mod_user.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-77518@lists.php.net to get a copy of this message
Commit: fa2e7ba0cb5230e7fb02da0e0b1726e468f270ce Author: Xinchen Hui <laruence@gmail.com> Sat, 29 Mar 2014 20:17:59 +0800 Parents: 6e34bde64b38f5bc848b2f3d045d547f9c4d3ccd Branches: phpng Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=fa2e7ba0cb5230e7fb02da0e0b1726e468f270ce Log: Fixed retval for ps_call_handler Changed paths: M ext/session/mod_user.c Diff: diff --git a/ext/session/mod_user.c b/ext/session/mod_user.c index 4e42a1b..2b4e799 100644 --- a/ext/session/mod_user.c +++ b/ext/session/mod_user.c @@ -50,7 +50,12 @@ ps_module ps_mod_user = { static void ps_call_handler(zval *func, int argc, zval *argv, zval *retval TSRMLS_DC) { int i; - call_user_function(EG(function_table), NULL, func, retval, argc, argv TSRMLS_CC); + if (call_user_function(EG(function_table), NULL, func, retval, argc, argv TSRMLS_CC) == FAILURE) { + zval_ptr_dtor(retval); + ZVAL_UNDEF(retval); + } else if (ZVAL_IS_UNDEF(retval)) { + ZVAL_NULL(retval); + } for (i = 0; i < argc; i++) { zval_ptr_dtor(&argv[i]); }

« previous php.cvs (#77518) next »