com php-src: 3rd arg to stream_set_timeout is option al ignore_user_abort() should take a bool n ot a string: ext/standard/basic_functions.c
| From: | Rasmus Lerdorf | Date: | Thu, 25 Jun 2015 17:31:37 +0000 |
| Subject: | com php-src: 3rd arg to stream_set_timeout is option al ignore_user_abort() should take a bool n ot a string: ext/standard/basic_functions.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-87533@lists.php.net to get a copy of this message | ||
Commit: 7ceb47477dbaac39d4ee42c3070463e229d2f090
Author: Rasmus Lerdorf <rasmus@php.net> Thu, 25 Jun 2015 10:30:41 -0700
Parents: 20585beb76f54c2991c0d71b08afd9fffb3788b3
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7ceb47477dbaac39d4ee42c3070463e229d2f090
Log:
3rd arg to stream_set_timeout is optional
ignore_user_abort() should take a bool not a string
Changed paths:
M ext/standard/basic_functions.c
Diff:
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index c96996e...81f54a5 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -2089,7 +2089,7 @@ ZEND_BEGIN_ARG_INFO(arginfo_stream_set_blocking, 0)
ZEND_END_ARG_INFO()
#if HAVE_SYS_TIME_H || defined(PHP_WIN32)
-ZEND_BEGIN_ARG_INFO(arginfo_stream_set_timeout, 0)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_set_timeout, 0, 0, 2)
ZEND_ARG_INFO(0, stream)
ZEND_ARG_INFO(0, seconds)
ZEND_ARG_INFO(0, microseconds)
@@ -5509,14 +5509,14 @@ PHP_FUNCTION(connection_status)
}
/* }}} */
-/* {{{ proto int ignore_user_abort([string value])
+/* {{{ proto int ignore_user_abort([bool value])
Set whether we want to ignore a user abort event or not */
PHP_FUNCTION(ignore_user_abort)
{
- zend_string *arg = NULL;
+ zend_bool arg = 0;
int old_setting;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "|S", &arg) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &arg) == FAILURE) {
return;
}
@@ -5524,7 +5524,7 @@ PHP_FUNCTION(ignore_user_abort)
if (arg) {
zend_string *key = zend_string_init("ignore_user_abort",
sizeof("ignore_user_abort"), 0);
- zend_alter_ini_entry_ex(key, arg, PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0);
+ zend_alter_ini_entry_chars(key, arg ? "1" : "0", 1, PHP_INI_USER,
PHP_INI_STAGE_RUNTIME);
zend_string_release(key);
}