]> granicus.if.org Git - php/commitdiff
urlencode and decode return an empty-string if the input-string is empty (matches...
authorThies C. Arntzen <thies@php.net>
Tue, 22 Jun 1999 13:35:28 +0000 (13:35 +0000)
committerThies C. Arntzen <thies@php.net>
Tue, 22 Jun 1999 13:35:28 +0000 (13:35 +0000)
Please read my previous mail and comment!

ext/standard/url.c

index 675a687a7aeb88ba63ac003a9027e75031469644..24c48831893a9bd8a83cabc1eec295f1cc57c89a 100644 (file)
@@ -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);