]> granicus.if.org Git - php/commitdiff
Fixed bug #29034 (wordwrap() returns a boolean when passed empty string).
authorIlia Alshanetsky <iliaa@php.net>
Tue, 6 Jul 2004 22:16:42 +0000 (22:16 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Tue, 6 Jul 2004 22:16:42 +0000 (22:16 +0000)
ext/standard/string.c

index 77c94942802dfb7b1f31a38bb5d7c2aefe6e6371..7eb33b8d7f657cb842deb4b01041215a949958e3 100644 (file)
@@ -641,8 +641,9 @@ PHP_FUNCTION(wordwrap)
                return;
        }
 
-       if (textlen == 0)
-               RETURN_FALSE;
+       if (textlen == 0) {
+               RETURN_EMPTY_STRING();
+       }
 
        if (linelength == 0 && docut) {
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "Can't force cut when width is zero.");