From: Felipe Pena Date: Thu, 30 Oct 2008 14:30:02 +0000 (+0000) Subject: - Fix the fix (thanks Hannes!) X-Git-Tag: BEFORE_HEAD_NS_CHANGE~128 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=18467f71d105627353f7d8173020cbad22848502;p=php - Fix the fix (thanks Hannes!) --- 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; }