Skip to content

Commit 314a9f8

Browse files
committed
Fix #71882 amendment: Negative ftruncate() on php://memory exhausts memory
To avoid BC breaks, we do not raise a warning for now.
1 parent 747b618 commit 314a9f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/standard/file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1513,7 +1513,7 @@ PHP_NAMED_FUNCTION(php_if_ftruncate)
15131513
}
15141514

15151515
if (size < 0) {
1516-
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Negative size is not supported");
1516+
/* php_error_docref(NULL TSRMLS_CC, E_WARNING, "Negative size is not supported"); */
15171517
RETURN_FALSE;
15181518
}
15191519

0 commit comments

Comments
 (0)