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

NEWS
ext/standard/string.c

diff --git a/NEWS b/NEWS
index 2383d570ab3d68760172e440207bce75dd6372ae..1cd388a3f311c09f4b3eee71bde66d3bc6c78b97 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,8 @@ PHP 4                                                                      NEWS
 - Updated PCRE to provide better error handling in certain cases. (Andrei)
 - NSAPI: added "bucket" parameter to list of non-php.ini-keys of php4_execute
   for doing performance stats without warnings in server-log. (Uwe Schindler)
+- Fixed bug #29034 (wordwrap() returns a boolean when passed empty string).
+  (Ilia)
 - Fixed bug #28963 (Missing space for \0 in address allocation). (Ilia)
 - Fixed bug #28897 (ibase: -1 returned as -0.000 for 64-bit scaled int). (Ard)
 - Fixed bug #28879 (Implicit/Explicit array creation inconsistency when using
index 83992dbc3e9e2a6381d3ab64a8ecfb85b766785d..25d061a107d5403d624c2a830834c4cf5a3a15c5 100644 (file)
@@ -637,8 +637,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.");