@@ -739,7 +739,7 @@ PHP_FUNCTION(getenv)
739
739
740
740
ZEND_PARSE_PARAMETERS_START (0 , 2 )
741
741
Z_PARAM_OPTIONAL
742
- Z_PARAM_STRING (str , str_len )
742
+ Z_PARAM_STRING_OR_NULL (str , str_len )
743
743
Z_PARAM_BOOL (local_only )
744
744
ZEND_PARSE_PARAMETERS_END ();
745
745
@@ -1429,22 +1429,17 @@ PHP_FUNCTION(error_log)
1429
1429
{
1430
1430
char * message , * opt = NULL , * headers = NULL ;
1431
1431
size_t message_len , opt_len = 0 , headers_len = 0 ;
1432
- int opt_err = 0 , argc = ZEND_NUM_ARGS ();
1433
1432
zend_long erropt = 0 ;
1434
1433
1435
1434
ZEND_PARSE_PARAMETERS_START (1 , 4 )
1436
1435
Z_PARAM_STRING (message , message_len )
1437
1436
Z_PARAM_OPTIONAL
1438
1437
Z_PARAM_LONG (erropt )
1439
- Z_PARAM_PATH (opt , opt_len )
1440
- Z_PARAM_STRING (headers , headers_len )
1438
+ Z_PARAM_PATH_OR_NULL (opt , opt_len )
1439
+ Z_PARAM_STRING_OR_NULL (headers , headers_len )
1441
1440
ZEND_PARSE_PARAMETERS_END ();
1442
1441
1443
- if (argc > 1 ) {
1444
- opt_err = (int )erropt ;
1445
- }
1446
-
1447
- if (_php_error_log_ex (opt_err , message , message_len , opt , headers ) == FAILURE ) {
1442
+ if (_php_error_log_ex ((int ) erropt , message , message_len , opt , headers ) == FAILURE ) {
1448
1443
RETURN_FALSE ;
1449
1444
}
1450
1445
@@ -2270,16 +2265,17 @@ PHP_FUNCTION(connection_status)
2270
2265
PHP_FUNCTION (ignore_user_abort )
2271
2266
{
2272
2267
zend_bool arg = 0 ;
2268
+ zend_bool arg_is_null = 1 ;
2273
2269
int old_setting ;
2274
2270
2275
2271
ZEND_PARSE_PARAMETERS_START (0 , 1 )
2276
2272
Z_PARAM_OPTIONAL
2277
- Z_PARAM_BOOL (arg )
2273
+ Z_PARAM_BOOL_OR_NULL (arg , arg_is_null )
2278
2274
ZEND_PARSE_PARAMETERS_END ();
2279
2275
2280
2276
old_setting = (unsigned short )PG (ignore_user_abort );
2281
2277
2282
- if (ZEND_NUM_ARGS () ) {
2278
+ if (! arg_is_null ) {
2283
2279
zend_string * key = zend_string_init ("ignore_user_abort" , sizeof ("ignore_user_abort" ) - 1 , 0 );
2284
2280
zend_alter_ini_entry_chars (key , arg ? "1" : "0" , 1 , PHP_INI_USER , PHP_INI_STAGE_RUNTIME );
2285
2281
zend_string_release_ex (key , 0 );
0 commit comments