diff options
author | Stanislav Malyshev <stas@php.net> | 2007-11-20 02:46:45 +0000 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2007-11-20 02:46:45 +0000 |
commit | 6c3beee05db2aee887cdee73720131ecd4faf1de (patch) | |
tree | ebdffbdcb99074da3074e140eb837b17782657aa | |
parent | 5ca87f290ce0eeafe82d695f6cdecffd152da7e2 (diff) | |
download | php-git-6c3beee05db2aee887cdee73720131ecd4faf1de.tar.gz |
merge wordwrap fix
-rw-r--r-- | ext/standard/string.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/standard/string.c b/ext/standard/string.c index 66773a9520..4e9c33a3ad 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -646,6 +646,11 @@ PHP_FUNCTION(wordwrap) RETURN_EMPTY_STRING(); } + if (breakcharlen == 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Break string cannot be empty"); + RETURN_FALSE; + } + if (linelength == 0 && docut) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Can't force cut when width is zero."); RETURN_FALSE; |