summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2016-08-30 12:06:46 +0200
committerAnatol Belski <ab@php.net>2016-08-30 12:06:46 +0200
commit62d5bfb5277dd84e1a185c567982f2196cd19437 (patch)
tree7c0a2aaced56542e9c11a9e4cb243e456b1fbb7a
parent07cc6a6ba2d8cebe2b375353491a26953b250149 (diff)
downloadphp-git-62d5bfb5277dd84e1a185c567982f2196cd19437.tar.gz
Revert "Merge branch 'PHP-5.6' into PHP-7.0"
This reverts commit 65f0c163f929e48162efc3491fee918bb5c4c280, reversing changes made to 4b45c0a9a7d48a69edba9e00270c49bbe17af4d1.
-rw-r--r--ext/standard/file.c5
-rw-r--r--ext/standard/tests/file/bug71882.phpt11
2 files changed, 0 insertions, 16 deletions
diff --git a/ext/standard/file.c b/ext/standard/file.c
index e228ce6121..5c90b30559 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -1546,11 +1546,6 @@ PHP_NAMED_FUNCTION(php_if_ftruncate)
RETURN_FALSE;
}
- if (size < 0) {
- php_error_docref(NULL, E_WARNING, "Negative size is not supported");
- RETURN_FALSE;
- }
-
PHP_STREAM_TO_ZVAL(stream, fp);
if (!php_stream_truncate_supported(stream)) {
diff --git a/ext/standard/tests/file/bug71882.phpt b/ext/standard/tests/file/bug71882.phpt
deleted file mode 100644
index ae0137b599..0000000000
--- a/ext/standard/tests/file/bug71882.phpt
+++ /dev/null
@@ -1,11 +0,0 @@
---TEST--
-Bug #71882 (Negative ftruncate() on php://memory exhausts memory)
---FILE--
-<?php
-$fd = fopen("php://memory", "w+");
-ftruncate($fd, -1);
-?>
-==DONE==
---EXPECTF--
-Warning: ftruncate(): Negative size is not supported in %s%ebug71882.php on line %d
-==DONE==