From 18467f71d105627353f7d8173020cbad22848502 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Thu, 30 Oct 2008 14:30:02 +0000 Subject: [PATCH] - Fix the fix (thanks Hannes!) --- ext/standard/streamsfuncs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c index 043fe9dc54..93ac9306de 100644 --- a/ext/standard/streamsfuncs.c +++ b/ext/standard/streamsfuncs.c @@ -408,7 +408,7 @@ PHP_FUNCTION(stream_get_contents) php_stream_from_zval(stream, &zsrc); - if (pos >= 0 && php_stream_seek(stream, pos, SEEK_SET) < 0) { + if ((pos > 0 || (pos == 0 && ZEND_NUM_ARGS() > 2)) && php_stream_seek(stream, pos, SEEK_SET) < 0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to seek to position %ld in the stream", pos); RETURN_FALSE; } -- 2.40.0