diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2004-07-06 22:16:42 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2004-07-06 22:16:42 +0000 |
commit | 5201e62d0d4be5e7cd79c30fb50a776b05ac501a (patch) | |
tree | f264a57259b4ae5b0652aec68340ac2001b8baff | |
parent | c144fdf680b9c4d0a6e2faf6e4140979350f69d6 (diff) | |
download | php-git-5201e62d0d4be5e7cd79c30fb50a776b05ac501a.tar.gz |
Fixed bug #29034 (wordwrap() returns a boolean when passed empty string).
-rw-r--r-- | ext/standard/string.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/standard/string.c b/ext/standard/string.c index 77c9494280..7eb33b8d7f 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -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."); |