Commit 4315c3a5aa1 for php.net
commit 4315c3a5aa1380ebf874daa9a2629e83ad4afa46
Author: Niels Dossche <7771979+ndossche@users.noreply.github.com>
Date: Fri Dec 19 12:11:17 2025 -0800
standard: Remove nonsensical dtor of return value in fread() (#20739)
It was never set to a string at this point, so why dtor it?
diff --git a/ext/standard/file.c b/ext/standard/file.c
index fdeabd1872d..4168cd0f84b 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -1555,7 +1555,6 @@ PHPAPI PHP_FUNCTION(fread)
str = php_stream_read_to_str(stream, len);
if (!str) {
- zval_ptr_dtor_str(return_value);
RETURN_FALSE;
}