andrei Wed Oct 25 20:30:51 2006 UTC Modified files: /php-src/ext/standard basic_functions.c Log: http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.819&r2=1.820&diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.819 php-src/ext/standard/basic_functions.c:1.820 --- php-src/ext/standard/basic_functions.c:1.819 Wed Oct 25 20:09:21 2006 +++ php-src/ext/standard/basic_functions.c Wed Oct 25 20:30:51 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: basic_functions.c,v 1.819 2006/10/25 20:09:21 andrei Exp $ */ +/* $Id: basic_functions.c,v 1.820 2006/10/25 20:30:51 andrei Exp $ */ #include "php.h" #include "php_streams.h" @@ -5306,7 +5306,7 @@ zend_end_try(); } -/* {{{ proto void register_shutdown_function(string function_name) +/* {{{ proto void register_shutdown_function(string function_name) U Register a user-level function to be called on request termination */ PHP_FUNCTION(register_shutdown_function) { @@ -5771,31 +5771,24 @@ } /* }}} */ -/* {{{ proto int ignore_user_abort([string value]) +/* {{{ proto int ignore_user_abort([string value]) U Set whether we want to ignore a user abort event or not */ PHP_FUNCTION(ignore_user_abort) { - zval **arg; + char *arg = NULL; + int arg_len; int old_setting; old_setting = PG(ignore_user_abort); - switch (ZEND_NUM_ARGS()) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s&", &arg, &arg_len, + UG(ascii_conv)) == FAILURE) { + return; + } - case 0: - break; - - case 1: - if (zend_get_parameters_ex(1, &arg) == FAILURE) { - RETURN_FALSE; - } - convert_to_string_ex(arg); - zend_alter_ini_entry("ignore_user_abort", sizeof("ignore_user_abort"), Z_STRVAL_PP(arg), Z_STRLEN_PP(arg), PHP_INI_USER, PHP_INI_STAGE_RUNTIME); - break; - - default: - WRONG_PARAM_COUNT; - break; + if (arg) { + zend_alter_ini_entry("ignore_user_abort", sizeof("ignore_user_abort"), arg, arg_len, PHP_INI_USER, PHP_INI_STAGE_RUNTIME); } + RETURN_LONG(old_setting); } /* }}} */
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php