1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 02:33:17 +02:00

Merge branch 'PHP-7.0'

* PHP-7.0:
  size_t is unsigned and can't be negative
This commit is contained in:
Dmitry Stogov
2016-04-29 12:24:13 +03:00
+1 -1
View File
@@ -2882,7 +2882,7 @@ SPL_METHOD(SplFileObject, fwrite)
if (ZEND_NUM_ARGS() > 1) {
if (length >= 0) {
str_len = MAX(0, MIN((size_t)length, str_len));
str_len = MIN((size_t)length, str_len);
} else {
/* Negative length given, nothing to write */
str_len = 0;