From 60c435df5e2ccd4c714e0dcfb2aa81a6805b8b33 Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Tue, 13 Feb 2007 12:56:36 +0000 Subject: [PATCH] MFH --- ext/standard/file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/standard/file.c b/ext/standard/file.c index 9f60c45b32..5d2bd6f2ae 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -546,7 +546,8 @@ PHP_FUNCTION(file_get_contents) } if (offset > 0 && php_stream_seek(stream, offset, SEEK_SET) < 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to seek to position %ld in the stream.", offset); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to seek to position %ld in the stream", offset); + php_stream_close(stream); RETURN_FALSE; } -- 2.40.0