summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/standard/string.c5
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.");