From: Stanislav Malyshev Date: Sun, 20 Aug 2000 16:09:06 +0000 (+0000) Subject: Fix by-reference passing for scanf's X-Git-Tag: php-4.0.2RC1~25 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5a7409ee1aeeb8dd46410a418a2a1523714373ac;p=php Fix by-reference passing for scanf's @- Fix by-reference parameters passing for xml_ functions and for scanf functions (Stas) --- diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index bd7781d04b..13f8e1961f 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -64,6 +64,7 @@ static unsigned char second_and_third_args_force_ref[] = { 3, BYREF_NONE, BYREF_ static unsigned char second_args_force_ref[] = { 2, BYREF_NONE, BYREF_FORCE }; static unsigned char third_argument_force_ref[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE }; static unsigned char third_and_fourth_args_force_ref[] = { 4, BYREF_NONE, BYREF_NONE, BYREF_FORCE, BYREF_FORCE }; +static unsigned char third_and_rest_force_ref[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE_REST }; typedef struct _php_shutdown_function_entry { zval **arguments; @@ -177,8 +178,8 @@ function_entry basic_functions[] = { PHP_FALIAS(strchr, strstr, NULL) PHP_NAMED_FE(sprintf, PHP_FN(user_sprintf), NULL) PHP_NAMED_FE(printf, PHP_FN(user_printf), NULL) - PHP_FE(sscanf, NULL) - PHP_FE(fscanf, NULL) + PHP_FE(sscanf, third_and_rest_force_ref) + PHP_FE(fscanf, third_and_rest_force_ref) PHP_FE(parse_url, NULL) PHP_FE(urlencode, NULL)