diff options
| -rw-r--r-- | ext/standard/string.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/string.c b/ext/standard/string.c index e12d5d6a0f..a4cfe6e388 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -4884,7 +4884,7 @@ PHP_FUNCTION(substr_compare) RETURN_FALSE; } - if (offset + len >= s1_len) { + if ((offset + len) >= s1_len) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "The start position cannot exceed initial string length."); RETURN_FALSE; } |
