]> granicus.if.org Git - php/commitdiff
*** empty log message ***
authorAndrei Zmievski <andrei@php.net>
Wed, 25 Oct 2006 20:30:51 +0000 (20:30 +0000)
committerAndrei Zmievski <andrei@php.net>
Wed, 25 Oct 2006 20:30:51 +0000 (20:30 +0000)
ext/standard/basic_functions.c

index afb180d15354fcef95605521f297b2e4e7dc4f61..596e99c4d9ffc21b412f0c6e0ddd5a21fd54bc58 100644 (file)
@@ -5306,7 +5306,7 @@ void php_free_shutdown_functions(TSRMLS_D)
                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 @@ PHP_FUNCTION(connection_status)
 }
 /* }}} */
 
-/* {{{ 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);
 }
 /* }}} */