]> granicus.if.org Git - php/commitdiff
MFH
authorAntony Dovgal <tony2001@php.net>
Tue, 13 Feb 2007 12:56:36 +0000 (12:56 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 13 Feb 2007 12:56:36 +0000 (12:56 +0000)
ext/standard/file.c

index 9f60c45b322ba52e1260f5ade0698114038ba44d..5d2bd6f2ae75aa7165471a8600b042afbcd3a055 100644 (file)
@@ -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;
        }