From: Thies C. Arntzen Date: Tue, 22 Jun 1999 13:35:28 +0000 (+0000) Subject: urlencode and decode return an empty-string if the input-string is empty (matches... X-Git-Tag: BEFORE_REMOVING_GC_STEP1~101 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5fa6882567f5c4d2beed10f02b5a5181079cb882;p=php urlencode and decode return an empty-string if the input-string is empty (matches php3 behaviour "more" closly) Please read my previous mail and comment! --- diff --git a/ext/standard/url.c b/ext/standard/url.c index 675a687a7a..24c4883189 100644 --- a/ext/standard/url.c +++ b/ext/standard/url.c @@ -276,7 +276,8 @@ PHP_FUNCTION(urlencode) convert_to_string(arg); if (!arg->value.str.len) { - RETURN_FALSE; + var_reset(return_value); + return; } str = _php3_urlencode(arg->value.str.val, arg->value.str.len); RETVAL_STRING(str, 1); @@ -297,7 +298,8 @@ PHP_FUNCTION(urldecode) convert_to_string(arg); if (!arg->value.str.len) { - RETURN_FALSE; + var_reset(return_value); + return; } len = _php3_urldecode(arg->value.str.val, arg->value.str.len);