iliaa           Tue Jul  6 18:16:47 2004 EDT

  Modified files:              (Branch: PHP_4_3)
    /php-src    NEWS 
    /php-src/ext/standard       string.c 
  Log:
  MFH: Fixed bug #29034 (wordwrap() returns a boolean when passed empty
  string).
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.695&r2=1.1247.2.696&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.695 php-src/NEWS:1.1247.2.696
--- php-src/NEWS:1.1247.2.695   Mon Jul  5 07:44:19 2004
+++ php-src/NEWS        Tue Jul  6 18:16:46 2004
@@ -4,6 +4,8 @@
 - 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
http://cvs.php.net/diff.php/php-src/ext/standard/string.c?r1=1.333.2.42&r2=1.333.2.43&ty=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.333.2.42 
php-src/ext/standard/string.c:1.333.2.43
--- php-src/ext/standard/string.c:1.333.2.42    Sat Jun 26 03:44:12 2004
+++ php-src/ext/standard/string.c       Tue Jul  6 18:16:47 2004
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: string.c,v 1.333.2.42 2004/06/26 07:44:12 sesser Exp $ */
+/* $Id: string.c,v 1.333.2.43 2004/07/06 22:16:47 iliaa Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -637,8 +637,9 @@
                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.");

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to