summaryrefslogtreecommitdiff
path: root/ext/standard/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/string.c')
-rw-r--r--ext/standard/string.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/ext/standard/string.c b/ext/standard/string.c
index abe4eb1aba..cb6a8b4315 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -908,11 +908,7 @@ PHP_FUNCTION(wordwrap)
RETURN_FALSE;
}
- if (linelength < 0) {
- /* For BC */
- linelength = 0;
- }
- if (linelength > INT_MAX) {
+ if (linelength < 0 || linelength > INT_MAX) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Length should be between 0 and %d", INT_MAX);
RETURN_FALSE;
}