diff options
author | Thies C. Arntzen <thies@php.net> | 1999-06-22 13:35:28 +0000 |
---|---|---|
committer | Thies C. Arntzen <thies@php.net> | 1999-06-22 13:35:28 +0000 |
commit | 5fa6882567f5c4d2beed10f02b5a5181079cb882 (patch) | |
tree | 4766eb2d5483f15e2911ade2a21ce84f8cf76227 /ext/standard/url.c | |
parent | 8139b776e9cab130cb849ef6e64388ad0b20b474 (diff) | |
download | php-git-5fa6882567f5c4d2beed10f02b5a5181079cb882.tar.gz |
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!
Diffstat (limited to 'ext/standard/url.c')
-rw-r--r-- | ext/standard/url.c | 6 |
1 files changed, 4 insertions, 2 deletions
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); |