]> granicus.if.org Git - php/commitdiff
Don't do anything, if the input string has a length of 0.
authorSascha Schumann <sas@php.net>
Sun, 17 Dec 2000 02:09:07 +0000 (02:09 +0000)
committerSascha Schumann <sas@php.net>
Sun, 17 Dec 2000 02:09:07 +0000 (02:09 +0000)
PR: #7686

ext/standard/string.c

index 39cdd923d2dd041d297faf7e63e048672d2a511f..d587093d5e32b53d2ea9d1eb9f6270599408c86b 100644 (file)
@@ -263,6 +263,10 @@ PHP_FUNCTION(wordwrap)
        }
 
        convert_to_string_ex(ptext);
+       
+       if (Z_STRVAL_PP(ptext) == 0)
+               RETVAL_FALSE;
+       
        text = (*ptext)->value.str.val;
 
        if (ZEND_NUM_ARGS() > 1) {